In my Elastic Beanstalk - Container Options. RACK_ENV
is set to staging
.
In fact, if I SSH into the EC2 instance and do rails console
in /var/app/current/
and then typing Rails.env
it returns staging
.
Reading http://www.modrails.com/documentation/Users guide Nginx.html#RackEnv
It says to set a RACK_ENV
variable, since by default, the value is production
.
You would assume everything would work, except in the Elastic Beanstalk logs, it says:
[ 2013-11-18 14:28:26.4677 8061/7fb5fe01a700 Pool2/Implementation.cpp:1274 ]: [App 7428 stdout] PG::ConnectionBad (FATAL: database "foobar_production" does not exist
foobar_production
database does not exist, but foobar_staging
does. So why is Passenger still looking at the production environment, when it should be looking at staging.