[LRUG] routes problem
Chris Mear
chrismear at gmail.com
Fri Feb 19 02:49:21 PST 2010
On 18 Feb 2010, at 14:51, Riccardo Tacconi wrote:
> Hi,
>
> I have routes configuration like this:
>
> map.resources :folders
>
> map.connect 'change_team/:id/:team_id', :controller => 'whoswho', :action =>
> 'change_team'
> map.connect 'holiday/reset_line_manager/:id', :controller => 'holiday',
> :action => 'disconnect'
> map.connect 'holiday/list_users/:id', :controller => 'holiday', :action =>
> 'list_users'
> map.connect 'test', :controller => 'test', :action => 'index'
> map.connect 'tutorials', :controller => 'categories', :action => 'index'
> map.connect 'showvideo/:title', :controller => 'videos', :action =>
> 'title'
> map.connect 'access/', :controller => 'access'
> #map.connect "reports/:action", :controller => :reports
> map.connect ':controller/:action/:id'
> map.connect ':controller/:action/:id.:format'
>
> In development with Mongrel I am able to call domain.com/reports but in
> production I get a 'No route matches "/reports" with {:method=>:get}' error
> if I call domain.com/apps/reports. The production run with Passenger as sub
> directory (apps).
>
> Is the problem caused because I am running Rails in a sub directory with
> Passenger?
Most likely. Do you have this in your production.rb?
config.action_controller.relative_url_root = "/app"
Chris
More information about the Chat
mailing list