Defect #2894

Update to svn HEAD breaks existing mod_ruby (passenger) deployments.

Added by Leszek Ciesielski over 8 years ago. Updated over 6 years ago.

Status:ClosedStart date:2009-03-04
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Resolution:Fixed Affected version:

Description

I am running redmine svn-head using Apache and Passenger. The working setup (described on http://www.modrails.com/documentation/Users%20guide.html#deploying_rails_to_sub_uri ) has been broken with recent svn update. And in quite ugly way - all Redmine was able to show to me was a 404 page, with only "ActionController::RoutingError (No route matches "/redmine/" with {:method=>:get}):" in log giving a clue to what has actualy gone wrong. To fix, it is required to add the following line at the end of your config/environment.rb :

ActionController::AbstractRequest.relative_url_root = "/redmine" (as described on http://www.redmine.org/wiki/redmine/HowTo_Install_Redmine_in_a_sub-URI ).

Shouldn't this be mentioned in http://www.redmine.org/wiki/1/RedmineUpgrade ? And besides, what did change that this additional configuration is necessary?

production.log (104 KB) Leszek Ciesielski, 2009-03-04 12:23

environment.rb Magnifier (2.1 KB) Leszek Ciesielski, 2009-03-10 12:01

environment.rb Magnifier (2.23 KB) Leszek Ciesielski, 2009-05-26 10:36

Associated revisions

Revision 2551
Added by Jean-Philippe Lang over 8 years ago

Fixed broken OpenID authentication after migration to Rails 2.2 (#2894).

History

#1 Updated by Leszek Ciesielski over 8 years ago

After this configuration setting has been added, OpenID authentication no longer works (HTTP 500 errors, "NoMethodError (undefined method `relative_url_root' for ActionController::AbstractRequest:Class):
"). Log attached.

#2 Updated by Jean-Philippe Lang over 8 years ago

  • Status changed from New to Closed
  • Resolution set to Fixed

The OpenID authentication error is fixed in r2551.

And besides, what did change that this additional configuration is necessary?

Redmine did not introduce any change on this point but Rails 2.2.2 is now used.
It looks like the problem is on the mod_rails side:
http://schronet.webhop.org:8080/blog/intstalling-a-rails-application-in-a-subfolder-using-phusion-passenger/

#3 Updated by Leszek Ciesielski over 8 years ago

  • Status changed from Closed to Reopened

OpenID works fine, my site also functions ok. However, rake db:migrate RAILS_ENV="test" reports:

DEPRECATION WARNING: ActionController::AbstractRequest.relative_url_root= has been renamed.You can now set it with config.action_controller.relative_url_root=. (called from /var/www/redmine/config/environment.rb:54)

(and this also shows up in logs). Setting this as the warning suggests broke my deployment. Leaving it as I have it set currently results in failures in rake test.

#4 Updated by Jean-Philippe Lang over 8 years ago

Setting this as the warning suggests broke my deployment.

This is a Rails warning. Please attach your environment.rb.

#5 Updated by Leszek Ciesielski over 8 years ago

#6 Updated by Leszek Ciesielski over 8 years ago

I have updated my environment.rb as the deperecation warning suggested, I had previously placed the configuration directive wrongly (after 'end', d'oh!). Now the test failures are down to 16, from 80-something while I was using the deprecated ActionController::AbstractRequest.relative_url_root . Still, all tests should pass, shouldn't they?

#7 Updated by Jean-Baptiste Barth over 6 years ago

  • Status changed from Reopened to Closed

Pretty old bug, I suppose it's solved in latest stable releases.

Also available in: Atom PDF