Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku push rejected: can't find jquery-rails-2.0.0 in sources

I'm trying to push an Enki gem blog to Heroku and I'm getting an error

Could not find jquery-rails-2.0.0 in any of the sources

However, in the Gemfile I had

`gem 'jquery-rails'`

and I've never had a problem pushing an Enki blog with this setup before. Here's the full error message

 Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
           Fetching gem metadata from https://rubygems.org/.......
           Could not find jquery-rails-2.0.0 in any of the sources
     !
     !     Failed to install gems via Bundler.
     !
     !     Heroku push rejected, failed to compile Ruby/rails app

After I got the error message I added this to the gemfile

gem 'jquery-rails-2.0.0'

I got this error message

Could not find gem 'jquery-rails-2.0.0 (>= 0) java' in the gems available on this machine.

I then tried to do

gem install jquery-rails

It gave me

  Successfully installed jquery-rails-2.0.2
1 gem installed
Installing ri documentation for jquery-rails-2.0.2...
Installing RDoc documentation for jquery-rails-2.0.2...

But the push didn't work, same error

   -----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.2.0.rc
       Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
       Fetching gem metadata from https://rubygems.org/.......
       Could not find jquery-rails-2.0.0 in any of the sources
 !
 !     Failed to install gems via Bundler.
 !
 !     Heroku push rejected, failed to compile Ruby/rails app

this is the gemfile

source 'https://rubygems.org'

gem 'rails', '3.2.6'
gem 'heroku'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  gem 'uglifier', '>= 1.0.3'
end

group :development, :test do
  gem 'sqlite3'
end
group :production do
  gem 'pg'
end

group :production do
  gem 'thin'
end
platforms :jruby do
  gem 'activerecord-jdbcsqlite3-adapter'
  gem 'trinidad'
  gem 'jruby-openssl'
end

gem 'jquery-rails'
#gem 'jquery-rails-2.0.0'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug'

# Bundle the extra gems:
gem 'RedCloth', '~> 4.2.9', :require => 'redcloth'
gem 'ruby-openid', :require => 'openid'
gem 'rack-openid', :require => 'rack/openid'
gem 'aaronh-chronic', :require => 'chronic' # Fixes for 1.9.2
gem 'coderay'
gem 'lesstile'
gem 'formtastic'
gem 'will_paginate', '~> 3.0.2'
gem 'exception_notification', '~> 2.5.2'
gem 'open_id_authentication'

# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
group :test do
  gem 'database_cleaner'
  gem 'cucumber-rails',    :require => false
  gem 'cucumber-websteps', :require => false
  gem 'factory_girl'
  gem 'rspec'
  gem 'nokogiri', '~> 1.5.0'
  gem 'webrat'
end

group :development, :test do
  gem 'rspec-rails'
end
like image 311
Leahcim Avatar asked Aug 09 '12 04:08

Leahcim


2 Answers

I was getting this same error and fixed it using:

bundle update jquery-rails

In looking into it, it appears that jquery-rails 2.0.0 was yanked from rubygems: http://d.pr/i/cLms/1ReBI4U8 for whatever reason. So you (and I) likely happened to install jquery-rails when that gem was the most current version.

It's also wise to note that deleting your Gemfile.lock can be dangerous and not recommended in most cases. This causes all the latest versions of every gem without a version number in your Gemfile to be downloaded. If gems have been updated with API-breaking changes (happens more often than you might think), your app could break. But it also might not. Just be careful, run test cases if you have them. This has caused me more than one headache.

You can read a bit more about how bundler, Gemfile, and Gemfile.lock work (as well as guidance on how to properly upgrade certain gems) here: http://viget.com/extend/bundler-best-practices

like image 170
pwightman Avatar answered Oct 11 '22 14:10

pwightman


Worked for me:

  • delete the Gemfile.lock
  • removed the rails version from the line => gem 'rails' (jquery was already without a v number)
  • run the command "bundle install"
  • run also "bundle update jquery-rails" to make sure everything is updated
  • IMPORTANT, commit the new .lock file => run the "git add ." and "git commit ..."
  • push everything
like image 22
Alessio Valentini Avatar answered Oct 11 '22 13:10

Alessio Valentini