Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find gem 'jquery-rails (= 2.0.0) ruby' in the gems available on this machine

So in the GemFile if I leave it as gem 'query-rails' and install the bundle, it works. But if I specify the version like this:

gem 'jquery-rails', '2.0.0'

and want to install or update the bundle, it doesn't work and shows the error in the title.

I also did a

sudo gem install jquery-rails

and tried again to give a version to jQuery but still didn't work.

Why?!

like image 370
Bohn Avatar asked Jan 06 '13 02:01

Bohn


1 Answers

There is no v2.0.0 jquery-rails gem available - it was yanked. You should try using 2.0.1 or later. Generally, it's better to specify the '~>' helper to get the latest bug fixes for that minor version:

gem 'jquery-rails', '~> 2.0.0'

This will install v2.0.3 which is the latest of the 2.0.x series. Read What does tilde-greater-than (~>) mean in Ruby gem dependencies? and http://semver.org/ for more info on this.

like image 176
PinnyM Avatar answered Oct 18 '22 02:10

PinnyM