Rails 2.3 と mongrel_cluster と prefix
Railsを2.3にあげたら、こんなエラーが出るようになった。
'load_missing_constant': uninitialized constant ActionController::AbstractRequest (NameError)
Rails 2.3 には、 ActionController::AbstractRequest がなくなったので、mongrel_cluster で prefix を指定することができなくなったということらしい。
かわりに、どうするかというと
(1) config/environment.rb か config/environments/production.rb あたりに、次のように書いておく。
config.action_controller.relative_url_root = '/prefix'
(2) このままだと、cssやjsなどの静的ファイルが読めなくなるので、apacheの設定を次のように変更しておく。
# Rails 2.3の設定 ProxyPass /prefix http://localhost:4000 ProxyPassReverse /prefix http://localhost:4000 # Rails 2.2の設定 # ProxyPass /prefix http://localhost:4000/prefix # ProxyPassReverse /prefix http://localhost:4000/prefix