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

So, in the GemFile, if you leave it as a gem 'query-rails' and install the package, it will work. But if I specify the version as follows:

gem 'jquery-rails', '2.0.0' 

and you want to install or update the package, it does not work and shows an error in the header.

I also did

 sudo gem install jquery-rails 

and tried again to provide the jQuery version, but still didn't work.

Why?

+6
source share
1 answer

There is no jquery-rails gem v2.0.0 available - it was pulled . You should try using 2.0.1 or later. As a general rule, it is best to specify the "~>" helper to get the latest bug fixes for this minor version:

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

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

+26
source

All Articles