Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 3 如何填写AWS数据以便存储.yml_Ruby On Rails 3_Heroku_Was - Fatal编程技术网

Ruby on rails 3 如何填写AWS数据以便存储.yml

Ruby on rails 3 如何填写AWS数据以便存储.yml,ruby-on-rails-3,heroku,was,Ruby On Rails 3,Heroku,Was,我想把RubyonRails应用程序推送到heroku。但它被卡住了 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. remo

我想把RubyonRails应用程序推送到heroku。但它被卡住了

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'
除了我不知道为什么heroku要求使用
aws-eventstream-1.1.0
gem之外(因为它不在gem文件中)。我不确定如何填写以下字段中的storage.yml,如下所示:

以下是我的Heroku配置:

➜  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
我在网站上找到了一个解决方案:

  • 如果您在升级时获得此输出: 远程:捆绑程序输出:更改后,您正在尝试以部署模式安装 远程:你的文件。在别处运行
    捆绑安装
    ,然后添加 远程:已将Gemfile.lock更新为版本控制。 但是在本地运行bundle安装不会更改您的Gemfile.lock。请确保您在本地使用最新版本的bundler。我们建议使用1.13.7或更高版本。升级本地bundler版本后,请重新运行bundle安装并将结果提交给git,然后再部署。 如果运行bundle install并提交结果无法解决问题,请检查是否有任何使用ENV变量的自定义gem源。例如: 来源“https://{ENV['GEMFURY_URL'}@gem.fury.io/some-value-here/” 如果您正在使用ENV var为Gemfile中的源指定用户名或密码,请确保使用相同的ENV var在本地运行bundle install。此外,请验证捆绑后Gemfile.lock中是否存在包含任何用户名或密码的完整URL。 如果您不希望将用户名和密码检查到Git中,请考虑使用Bubter的内置支持,通过特殊的EV VAR配置用户名和密码。 使用相对路径指定BUNDLE\u GEMFILE可能不起作用https://github.com/bundler/bundler/pull/5815.
  • amazon:
      service: S3
      access_key_id:     AKIAXOOFZZFFKMQD3CFD
      secret_access_key: Cj8BcL452tDer5ryTPBRlan5LHOq76WXgvTDHmvc
      region:            region=eu-east-3
      bucket:            rails-tutorial-joost
    
    ➜  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