简体   繁体   English

无法推送到heroku - bundler失败

[英]Cannot push to heroku - bundler fails

I'm trying to push my rails project to heroku bit when doing a git push heroku master bundler fails with the following message: 我正在尝试将我的rails项目推送到heroku位当执行git push heroku master bundler失败时出现以下消息:

   Bundler Output: Fetching gem metadata from https://rubygems.org/.........
   Fetching additional metadata from https://rubygems.org/..
   Fetching git://github.com/justinfrench/formtastic.git
   Fetching git://github.com/activerecord-hackery/ransack.git
   Fetching git://github.com/gregbell/active_admin.git
   Could not find jwt-0.1.12 in any of the sources
!
!     Failed to install gems via Bundler.
!

!     Push rejected, failed to compile Ruby app

To git@heroku.com:murmuring-mountain-9361.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:murmuring-mountain-9361.git'

It seems jwt is a dependency of one of my gems, but it installs fine on my local environment. 似乎jwt是我的一个宝石的依赖,但它在我的本地环境中安装得很好。 I tried explicitly declaring gem 'jwt', '0.1.12' in my gemfile, which worked fine locally, but not on heroku and I tried deleting the Gemfile.lock and generating it again. 我尝试在我的gemfile中明确声明gem'jwt gem 'jwt', '0.1.12' ,这在本地运行良好,但在heroku上没有,我尝试删除Gemfile.lock并再次生成它。 I even tried deleting the app instance off heroku and creating it again. 我甚至尝试删除heroku上的app实例并再次创建它。

The following gist is my gemfile: https://gist.github.com/anonymous/84d3fc00566e036729cd 以下要点是我的gemfile: https ://gist.github.com/anonymous/84d3fc00566e036729cd

I'm using this vagrant box for my dev environment: https://github.com/ejholmes/vagrant-heroku 我在开发环境中使用这个流浪盒: https//github.com/ejholmes/vagrant-heroku

If you updated your gems in the last few days then you would have gotten a faulty version that was yanked. 如果你在过去几天更新了你的宝石,那么你就会得到一个被淘汰的错误版本。 It was re-released as 1.0.0 because it has a slightly different API. 它被重新发布为1.0.0,因为它的API略有不同。 I'd recommend using 0.1.11 or switching to 1.0 ... thanks, and sorry! 我建议使用0.1.11或切换到1.0 ...谢谢,对不起!

You'll get this when versions of Gems you are using (via your Gemfile.lock) have been yanked from RubyGems.org and Heroku is trying to grab them when you deploy. 当您使用的Gems版本(通过您的Gemfile.lock)从RubyGems.org中获取并且Heroku在部署时尝试抓取它们时,您将得到此信息。

You can see that 0.1.12 of jwt has been yanked at http://rubygems.org/gems/jwt/versions . 你可以看到jwt的0.1.12已经在http://rubygems.org/gems/jwt/versions上被拉了。 The thing to do would be to look at your Gemfile.lock to see which gem is declaring the dependency on 0.1.12 and then fork that gem and bump the version and then use your forked version. 要做的就是查看你的Gemfile.lock,看看哪个gem声明了对0.1.12的依赖,然后分叉那个gem并使版本崩溃,然后使用你的分叉版本。 Or contact the Gem owner and gem them to bump the dependency. 或者联系宝石所有者并给他们创建宝石以抵消依赖性。

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

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