开发者

Passenger 2.2.9 Ruby EE Ubuntu.. Can't get it to use 'default' production environment

开发者 https://www.devze.com 2022-12-20 14:00 出处:网络
Using Apache2 (2.2.12) / Passenger (2.2.9).. Have 2 apps running.. One runs fine in production mode the other insists on being in development mode.

Using Apache2 (2.2.12) / Passenger (2.2.9)..

Have 2 apps running.. One runs fine in production mode the other insists on being in development mode.

Have booted mongrel into production mode and the app works fine.. (script/server -e production)

Tried the following with no result...

Forced the RailsEnv in the apache virtual host.

Forced the RailsEnv in the passenger.conf in /etc/apache2/mods-available

=> Although production is the default mode I cannot get it to use production

I suspect the issue is somewhere between apac开发者_StackOverflow中文版he / passenger (and not in the rails app)

Any ideas? or suggestions


This is probably because you have a config.ru file in your RAILS_ROOT which means that Passenger is running your Rails application as a Rack application, which means that you need to set RackEnv and not RailsEnv in your apache configuration.


Thanks Jason.. set me on the right track.. Actually had to remove the config.ru to get it working.. Think the issue had to do with the passenger version, since I have it working with the config.ru on other servers (only diff is the passenger version)

0

精彩评论

暂无评论...
验证码 换一张
取 消