In my Rails app I\'m letting users upload an image when they create a \"release\", and it should upload directly to S3. I\'m getting the following error in both development and
In my case it was that I was using foreman (Heroku) which uses an .env file to store environment variables. So, when I did rake db:migrate
it couldn't find the ENV['AWS_ACCESS_KEY_ID']
What I did to run my migration was I temporarily added my AWS credentials directlñy into Carrierwave config block and then removed them after...
This is not a permanent solution because next time you migrate it will say the same thing...
For the permanent solution see: Use environment variables in Rake task
which says use: foreman run rake some_task
this way all variables defined in .env are loaded for the rake
task too