I've tried all night to deploy to Heroku, but I keep getting the same error:
remote: -----> Preparing app for Rails asset >pipeline
remote: Running: rake assets:precompile
remote: rake aborted!
remote: Devise.secret_key was not set. Please add the following to your Devise initializer:
remote: config.secret_key = 'secret token string'
remote: Please ensure you restarted your application after installing Devise or setting the key.
...
remote: ! Precompiling assets failed.
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to viral-blocitoff.
remote:
To https://git.heroku.com/viral-blocitoff.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/viral-blocitoff.git'
I also ran the following to set my environment variable for heroku:
figaro heroku:set -e production
This read all my fixed values, including SENDGRID and DEVISE_SECRET_KEY
Here is my application.yml file (minus the fixed values):
SENDGRID_PASSWORD: ********
SENDGRID_USERNAME: @heroku.com
production:
SECRET_KEY_BASE: secret token
DEVISE_SECRET_KEY: secret token
This is what I have in my devise.rb file:
config.secret_key = ENV['DEVISE_SECRET_KEY']
I looked at other proposed solutions on this site, but I made Devise work on another app less than two months ago without going through such tasks. Is there something I am missing?