Skip to content

Instantly share code, notes, and snippets.

View aomnes's full-sized avatar

Antoine OMNES aomnes

View GitHub Profile
@aomnes
aomnes / secret_key_base
Created September 25, 2016 11:17 — forked from pablosalgadom/secret_key_base
app error: Missing `secret_key_base` for 'production' environment, set this value in `config/secrets.yml` (RuntimeError)
So i was using Rails 4.1 with Unicorn v4.8.2 and when i tried to deploy my app it doesn't start properly and into the unicorn.log file i found this error message:
"app error: Missing `secret_key_base` for 'production' environment, set this value in `config/secrets.yml` (RuntimeError)"
After a little research i found that Rails 4.1 change the way to manage the secret_key, so if we read the secrets.yml file located at exampleRailsProject/config/secrets.yml (you need to replace "exampleRailsProject" for your project name) you will find something like this:
# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
besoin : "recuperer la liste des devises étrangeres"
getListForeignDevise() {
getListDevise(['EUR'])
}
assert getListForeignDevise() == ['YEN', 'USD']
En tant q'utilisateur