Redmineを「/redmine」などのコンテキストパスを指定して運用するときのメモです。 RedmineをMongrelで起動したときに mongrel_rails start -e production -p 3000 --prefix=/redmine ってprefixを指定すると http://xxxxxx/redmine/ などコンテキストパスを指定して起動することができるらしいのですが、 [root@www rails-demo]# mongrel_rails start -e production -p 3000 --prefix=/redmine ** Ruby version is not up-to-date; loading cgi_multipart_eof_fix ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with production environment... ** Mounting Rails at /redmine... /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:440:in `load_missing_constant': uninitialized constant ActionController::AbstractRequest (NameError) というエラーがでちゃうっぽい。どうも下記のおまじないが必要みたいです。 おまじないは、config/initializers ディレクトリに abstract_request.rb という以下の内容のファイルを作るだけです module ActionController class AbstractRequest < ActionController::Request def self.relative_url_root=(path) ActionController::Base.relative_url_root=(path) end def self.relative_url_root ActionController::Base.relative_url_root end end end あとは普通に起動すればOKのようです。 関連リンク †この記事は 現在のアクセス:5068 |