Question

I'm trying to push my rails project to heroku bit when doing a git push heroku master bundler fails with the following message:

   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. 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. I even tried deleting the app instance off heroku and creating it again.

The following gist is my gemfile: https://gist.github.com/anonymous/84d3fc00566e036729cd

I'm using this vagrant box for my dev environment: https://github.com/ejholmes/vagrant-heroku

Was it helpful?

Solution

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. I'd recommend using 0.1.11 or switching to 1.0 ... thanks, and sorry!

OTHER TIPS

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.

You can see that 0.1.12 of jwt has been yanked at 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. Or contact the Gem owner and gem them to bump the dependency.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top