Defect #2894
closedUpdate to svn HEAD breaks existing mod_ruby (passenger) deployments.
0%
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?
Files
Updated by Leszek Ciesielski over 15 years ago
- File production.log production.log added
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.
Updated by Jean-Philippe Lang over 15 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/
Updated by Leszek Ciesielski over 15 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
.
Updated by Jean-Philippe Lang over 15 years ago
Setting this as the warning suggests broke my deployment.
This is a Rails warning. Please attach your environment.rb.
Updated by Leszek Ciesielski over 15 years ago
- File environment.rb environment.rb added
Updated by Leszek Ciesielski over 15 years ago
- File environment.rb environment.rb added
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?
Updated by Jean-Baptiste Barth over 13 years ago
- Status changed from Reopened to Closed
Pretty old bug, I suppose it's solved in latest stable releases.