Can't force Rails into production environment via Passenger/Nginx

后端 未结 2 790
北荒
北荒 2021-02-06 11:18

I\'m having trouble getting a Rails app to run in the production environment via Phusion Passenger on Nginx/Ubuntu. According to the docs, the environment is controlled by the

2条回答
  •  甜味超标
    2021-02-06 11:52

    Workaround found at http://groups.google.com/group/phusion-passenger/browse_thread/thread/f91cd54bd379ad26/0a510133a080daac

    Add to config.ru:

    ENV['RAILS_ENV'] = ENV['RACK_ENV']  if !ENV['RAILS_ENV'] && ENV['RACK_ENV'] 
    

提交回复
热议问题