First thing you have to set carrierwave ENV! Using heroku config:add it sets the ENV variables but it will complain saying aws_access_key_id, aws_secret_access_key missing! So I had to resolve to figaro gem.
Now here comes trouble. You follow the Heroku procedure and when you bundle exec rake assets:precompile RAILS_ENV=production it will abort with the following error (note this error will appear even if assets are precompiled during git push heroku -u master):
SQLite3::SQLException: no such table: states: SELECT "states".* FROM "states"
rake aborted!
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: states: SELECT "states".* FROM "states"
(in /Users/coli/ticketee_review/app/assets/stylesheets/states.css.erb)
/Users/coli/ticketee_review/app/assets/stylesheets/states.css.erb:1:in `block in singleton class'
/Users/coli/ticketee_review/app/assets/stylesheets/states.css.erb:-5:in `instance_eval'
/Users/coli/ticketee_review/app/assets/stylesheets/states.css.erb:-5:in `singleton class'
/Users/coli/ticketee_review/app/assets/stylesheets/states.css.erb:-7:in `__tilt_70325732006880'
SQLite3::SQLException: no such table: states
/Users/coli/ticketee_review/app/assets/stylesheets/states.css.erb:1:in `block in singleton class'
/Users/coli/ticketee_review/app/assets/stylesheets/states.css.erb:-5:in `instance_eval'
/Users/coli/ticketee_review/app/assets/stylesheets/states.css.erb:-5:in `singleton class'
/Users/coli/ticketee_review/app/assets/stylesheets/states.css.erb:-7:in `__tilt_70325732006880'
Note this happens regardless even if you use postgresql in the database.yml!
This problem has been fixed in Chapter 10. Rather than having the State.all call in the asset file, it's now done in-line in the application layout itself.
First thing you have to set carrierwave ENV! Using
heroku config:add
it sets the ENV variables but it will complain sayingaws_access_key_id, aws_secret_access_key
missing! So I had to resolve tofigaro gem
. Now here comes trouble. You follow the Heroku procedure and when youbundle exec rake assets:precompile RAILS_ENV=production
it will abort with the following error (note this error will appear even if assets are precompiled duringgit push heroku -u master
):Note this happens regardless even if you use postgresql in the database.yml!