I upgrade an app to rails 2.2 rc and deploy it to phusion passenger. However, it fails. The error msg is " ActionController::RoutingError (No route matches "/msp/projects/new" with {:method=>:get})", in which the "msp" is the prefix path. The app works well if it is start with the command "ruby script/ server" or "mongrel_rails start". Then, I use the command "mongrel_rails start --prefix /msp ", getting the same result as above. more error msg is below: ActionController::RoutingError (No route matches "/msp/projects/new" with {:method=>:get}): /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ action_controller/routing/recognition_optimisation.rb:66:in `recognize_path'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ action_controller/routing/route_set.rb:385:in `recognize'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ action_controller/dispatcher.rb:179:in `handle_request'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ action_controller/dispatcher.rb:107:in `dispatch_unlocked'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ action_controller/dispatcher.rb:120:in `dispatch'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ action_controller/dispatcher.rb:119:in `synchronize'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ action_controller/dispatcher.rb:119:in `dispatch'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ action_controller/dispatcher.rb:129:in `dispatch_cgi'' --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Michael Koziarski
2008-Nov-01 11:20 UTC
Re: an route error about prefix path if rails 2.2 rc
Could you open a ticket for this in lighthouse? The behaviour of the relative_url_root setting changed slightly in 2.2, and we probably broke something that mongrel or passenger is expecting to be there. On Fri, Oct 31, 2008 at 7:58 AM, swachian <zhangyu34@gmail.com> wrote:> > I upgrade an app to rails 2.2 rc and deploy it to phusion passenger. > However, it fails. > The error msg is " > ActionController::RoutingError (No route matches "/msp/projects/new" > with {:method=>:get})", in which the "msp" is the prefix path. > The app works well if it is start with the command "ruby script/ > server" or "mongrel_rails start". > > Then, I use the command "mongrel_rails start --prefix /msp ", getting > the same result as above. > > > more error msg is below: > > ActionController::RoutingError (No route matches "/msp/projects/new" > with {:method=>:get}): > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ > action_controller/routing/recognition_optimisation.rb:66:in > `recognize_path'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ > action_controller/routing/route_set.rb:385:in `recognize'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ > action_controller/dispatcher.rb:179:in `handle_request'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ > action_controller/dispatcher.rb:107:in `dispatch_unlocked'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ > action_controller/dispatcher.rb:120:in `dispatch'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ > action_controller/dispatcher.rb:119:in `synchronize'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ > action_controller/dispatcher.rb:119:in `dispatch'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ > action_controller/dispatcher.rb:129:in `dispatch_cgi'' > > > >-- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On Nov 1, 12:20 pm, "Michael Koziarski" <mich...@koziarski.com> wrote:> Could you open a ticket for this in lighthouse? > > The behaviour of the relative_url_root setting changed slightly in > 2.2, and we probably broke something that mongrel or passenger is > expecting to be there.The change in relative_url_root behavior was necessary for thread- safety. Passenger needs to be updated. In the mean time, you can do it yourself by manually setting relative_url_root in your environment.rb. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
I create a [ticket](http://rails.lighthouseapp.com/projects/8994/ tickets/1314-an-routingerror-of-prefix-path#ticket-1314-1) yesterday. After I put ENV[''RAILS_RELATIVE_URL_ROOT'']="/msp" in the environment.rb, the app works with phusion passenger as before. On Nov 1, 7:20 pm, "Michael Koziarski" <mich...@koziarski.com> wrote:> Could you open a ticket for this in lighthouse? > > The behaviour of the relative_url_root setting changed slightly in > 2.2, and we probably broke something that mongrel or passenger is > expecting to be there. > > > > On Fri, Oct 31, 2008 at 7:58 AM, swachian <zhangy...@gmail.com> wrote: > > > I upgrade an app to rails 2.2 rc and deploy it to phusion passenger. > > However, it fails. > > The error msg is " > > ActionController::RoutingError (No route matches "/msp/projects/new" > > with {:method=>:get})", in which the "msp" is the prefix path. > > The app works well if it is start with the command "ruby script/ > > server" or "mongrel_rails start". > > > Then, I use the command "mongrel_rails start --prefix /msp ", getting > > the same result as above. > > > more error msg is below: > > > ActionController::RoutingError (No route matches "/msp/projects/new" > > with {:method=>:get}): > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ > > action_controller/routing/recognition_optimisation.rb:66:in > > `recognize_path'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ > > action_controller/routing/route_set.rb:385:in `recognize'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ > > action_controller/dispatcher.rb:179:in `handle_request'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ > > action_controller/dispatcher.rb:107:in `dispatch_unlocked'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ > > action_controller/dispatcher.rb:120:in `dispatch'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ > > action_controller/dispatcher.rb:119:in `synchronize'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ > > action_controller/dispatcher.rb:119:in `dispatch'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.0/lib/ > > action_controller/dispatcher.rb:129:in `dispatch_cgi'' > > -- > Cheers > > Koz--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---