I want to push a Ruby on Rails app to heroku. But it gets stuck.
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Some gems seem to be missing from your vendor/cache directory.
remote: Could not find aws-eventstream-1.1.0 in any of the sources
remote: Bundler Output: Some gems seem to be missing from your vendor/cache directory.
remote: Could not find aws-eventstream-1.1.0 in any of the sources
remote:
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to pure-crag-52432.
remote:
To https://git.heroku.com/pure-crag-52432.git
! [remote rejected] user-microposts -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/pure-crag-52432.git'
Apart from the fact that I don't know why heroku asks for the aws-eventstream-1.1.0
gem (because it is not in the Gemfile). I am not sure in how to fill in the field below for the storage.yml as given in this guide:
.
amazon:
service: S3
access_key_id: <%= ENV['AWS_ACCESS_KEY_ID'] %>
secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
region: <%= ENV['AWS_REGION'] %>
bucket: <%= ENV['AWS_BUCKET'] %>
Should I just leave it as it is and will the heroku configuration automatically be linked to this file?
I tried this (of course I changed all the answers a bit):
amazon:
service: S3
access_key_id: AKIAXOOFZZFFKMQD3CFD
secret_access_key: Cj8BcL452tDer5ryTPBRlan5LHOq76WXgvTDHmvc
region: region=eu-east-3
bucket: rails-tutorial-joost
These are my Heroku configurations:
➜ sample_app git:(user-microposts) heroku config
› Warning: heroku update available from 7.42.2 to 7.42.6.
=== pure-crag-52432 Config Vars
AWS_ACCESS_KEY_ID: AKIAXOOFOGFKKMQD3CFE
AWS_BUCKET: rails-tutorial-joost
AWS_REGION: region=eu-east-3
AWS_SECRET_ACCESS_KEY: Ci8BcL452tcxDer5ryTPBRlan5LHOq76WXgvTDHmvc
DATABASE_URL: postgres://blohftwliwefcg:6cfd2ccz2cc27301f86a1fe3c4686bb77784e67a62312d55c7e5751dfd61331c156@ec2-34-192-173-173.compute-1.amazonaws.com:5432/davr7msm9qlqh1
LANG: en_US.UTF-8
RACK_ENV: production
RAILS_ENV: production
RAILS_LOG_TO_STDOUT: enabled
RAILS_MASTER_KEY: ./config/credentials/production.key
RAILS_SERVE_STATIC_FILES: enabled
SECRET_KEY_BASE: 32c6c8d057cc6c61071f18429e64zxczxc337d795bfa81abd04ed3e74377eff9e6cddb024967e6a0ffb9bc7de55b408ad71291ab5e518bcfe20bb5a7b44871d570cc61
SENDGRID_PASSWORD: bdsk6q67625964
SENDGRID_USERNAME: appasd6786712@heroku.com
I found a solution at the site of the heroku helpcenter:
- If you are getting this output while upgrading: remote: Bundler Output: You are trying to install in deployment mode after changing remote: your Gemfile. Run
bundle install
elsewhere and add the remote: updated Gemfile.lock to version control. But locally running bundle install does not change your Gemfile.lock please make sure you’re using a recent version of bundler locally. We recommend 1.13.7 or above. Once you have upgraded your local bundler version please re-run bundle install and commit the results to git before deploying again. If running bundle install and committing the results does not resolve the issue, check to see if you have any custom gem sources that use an ENV var. For example: source "https://#{ENV['GEMFURY_URL'}@gem.fury.io/some-value-here/" If you are using an ENV var to specify a username or password for a source in your Gemfile, make sure you are running bundle install locally with the same ENV var. Also verify and that the full URL including any username or password is present in your Gemfile.lock after bundling. If you do not wish for your username and password to be checked into git, consider using bundler’s built in support for configuring username and password via a special ENV var. Specifying BUNDLE_GEMFILE with relative path may not work https://github.com/bundler/bundler/pull/5815.