0
votes

I'm trying to push a new app to Heroku, it has devise preinstalled locally. Once i try to hit the git push heroku master, every time it tells me 'Devise.secret_key was not set. Please add the following to your Devise initializer:' Now they key .. comes different everytime, so setting it in initializers/devise.rb had no effect what so ever. I've tried setting it in heroku under the vars, but the same, the key keeps changing

I'm using Rails 5.0 with devise 4.2.

Any idea idea on how to run it without it changing every single time ? or how to set it ?

*I've browsed stackoverflow for the past 2 hours and saw no solution to my question.

Thank you.

1
Maybe you can find some new approaches here? stackoverflow.com/questions/18080910/… - Clara
I have tried all of those approaches, none of them fixes the problem. I also don't understand why devise 'has to' continously update that key, something that on DO, aws or local does not happen - alex lug
What do you mean bu that: Now they key .. comes different everytime, ? - Clara

1 Answers

0
votes

Set SECRET_KEY_BASE through heroku dashboard or through cli - heroku config:set SECRET_KEY_BASE=<some-key-here>. Execute rake secret to get one.