lundi 24 août 2020

How to fill in the AWS data for storage.yml

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'

No I am not sure in how to fill in 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

Aucun commentaire:

Enregistrer un commentaire