rack - config.ru file for Rails 2.3.18 app -


does know contents of config.ru should rails 2.3.18 app in production run on passenger/unicorn/puma?

so far i've got:

# require environment file bootstrap rails require ::file.dirname(__file__) + '/config/environment'  # dispatch request run actioncontroller::dispatcher.new 

but it's loading development instead of correct production environment.

it turns out perfect config.ru.

the real problem unicorn's -e parameter sets rack_env , rails 2.3.18 needs rails_env in order correctly detect environment.

so, @ top of config/environment.rb, i've set env["rails_env"] ||= env["rack_env"] , working great.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

html - Accumulated Depreciation of Assets on php -

node.js - Node - Passport Auth - Authed Post Route hangs on form submission -