This works:
production:
adapter: mysql2
encoding: utf8
host: localhost
database: myapp
username: myapp
password: jksdfUIJsdf
Then on terminal touch tmp/restart.txt.
This does not work:
production:
adapter: mysql2
encoding: utf8
host: localhost
database: myapp
username: myapp
password: <%= ENV['MYAPP_DATABASE_PASSWORD'] %>
Then on terminal
export MYAPP_DATABASE_PASSWORD=jksdfUIJsdf
touch tmp/restart.txt
So if I set the password as plaintext in database.yml file then my application works properly but if I set the password as environment variable with export command, then my application does not work because it gives error password missing. I am using mysql database. How to solve this?