简体   繁体   English

AWS-Heroku-Ruby on Rails-无法通过Bundler安装gem

[英]AWS - Heroku - Ruby on Rails - Failed to install gems via Bundler

I am running bundle update in the AWS environment but I am getting an error: 我在AWS环境中运行捆绑包更新,但出现错误:

An error occurred while installing pg (0.20.0), and Bundler cannot continue. 安装pg(0.20.0)时发生错误,并且Bundler无法继续。 Make sure that gem install pg -v '0.20.0' --source 'https://rubygems.org/' succeeds before bundling. 捆绑之前,请确保gem install pg -v '0.20.0' --source 'https://rubygems.org/'成功。

I am following the this tutorial . 我正在关注本教程 When I run git push Heroku master , it says it failed to install gems via bundler . 当我运行git push Heroku master ,它说它failed to install gems via bundler

Im not sure why I cannot install the gems needed. 林不知道为什么我不能安装所需的宝石。

Any help or guidance would be greatly appreciated. 任何帮助或指导将不胜感激。 Thank you 谢谢

I don't know but i think you should run this step before bundling 我不知道,但我认为您应该在捆绑之前执行此步骤

gem install pg 宝石安装pg

Are you trying to deploy to AWS or Heroku? 您是否要部署到AWS或Heroku?

If it's Heroku: 如果是Heroku:

The pg version's that Heroku uses is: 0.21.0 Heroku使用的pg版本是:0.21.0

So, you should put into your Gemfile: 因此,您应该将其放入Gemfile中:

gem 'pg', '0.21.0'

And then commit and push to Heroku 然后提交并推送到Heroku

If it's AWS: 如果是AWS:

You should try just as @Kumar commented on your post... 您应该像@Kumar对您的帖子发表评论一样尝试...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM