Project

General

Profile

Actions

Defect #2894

closed

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

Added by Leszek Ciesielski almost 16 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-03-04
Due date:
% Done:

0%

Estimated time:
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?


Files

production.log (104 KB) production.log Leszek Ciesielski, 2009-03-04 12:23
environment.rb (2.1 KB) environment.rb Leszek Ciesielski, 2009-03-10 12:01
environment.rb (2.23 KB) environment.rb Leszek Ciesielski, 2009-05-26 10:36
Actions #1

Updated by Leszek Ciesielski almost 16 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.

Actions #2

Updated by Jean-Philippe Lang almost 16 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/

Actions #3

Updated by Leszek Ciesielski almost 16 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.

Actions #4

Updated by Jean-Philippe Lang almost 16 years ago

Setting this as the warning suggests broke my deployment.

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

Actions #6

Updated by Leszek Ciesielski over 15 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?

Actions #7

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.

Actions

Also available in: Atom PDF