config/secrets.yml error

46 views
Skip to first unread message

Avi

unread,
Dec 24, 2014, 12:43:07 AM12/24/14
to rubyonra...@googlegroups.com
Hello All,

I have problems setting up production environment.

Every time I try to run in production mode, it gives me error:
Unexpected error while processing request: Missing `secret_key_base` for 'production' environment, set this value in `config/secrets.yml`

In Local also if I do 'rails s -e production', it gives me the same error.
I tried to setup secret_base from the link - https://gist.github.com/pablosalgadom/4d75f30517edc6230a67.

But its still not working.
Can any one help me on this?

Thanks,
Avi  

Colin Law

unread,
Dec 24, 2014, 4:34:34 AM12/24/14
to rubyonra...@googlegroups.com
Post the file config/secrets.yml here. Check carefully the filename
and that it is in the config folder.

Colin

anshul kalra

unread,
Dec 24, 2014, 6:23:23 AM12/24/14
to rubyonra...@googlegroups.com
first find the secret key by going to the terminal,in your appliaction and then typing 
1)$ rake secret
this will give you a secret key,then it will give you a big key
2)now copy the secret key and then equal it to SECRET_KEY_BASE=

3) now type
                     export SECRET_KEY_BASE
4)now start the rail production server
rails s -e production

lemme know if you find any difficulty
Reply all
Reply to author
Forward
0 new messages