an route error about prefix path if rails 2.2 rc

305 views
Skip to first unread message

swachian

unread,
Oct 31, 2008, 2:58:16 AM10/31/08
to Ruby on Rails: Core
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'

Michael Koziarski

unread,
Nov 1, 2008, 7:20:59 AM11/1/08
to rubyonra...@googlegroups.com
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.

--
Cheers

Koz

Hongli Lai

unread,
Nov 1, 2008, 9:21:44 AM11/1/08
to Ruby on Rails: Core
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.

swachian

unread,
Nov 2, 2008, 1:29:09 AM11/2/08
to Ruby on Rails: Core
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.
Reply all
Reply to author
Forward
0 new messages