Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gem.source_index is deprecated, use Specification. Should I re-install Gem or Rails?

I'm learning RoR on Ubuntu 11. Got the following message when I was trying to generate an app. Did I install something incorrectly?

$ rails generate controller Pages home contact NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01. Gem.source_index called from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.12/lib/bundler/shared_helpers.rb:3. NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01. Gem.source_index called from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.12/lib/bundler/source.rb:162. NOTE: Gem::SourceIndex#each is deprecated with no replacement. It will be removed on or after 2011-11-01. Gem::SourceIndex#each called from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.12/lib/bundler/source.rb:162. NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01. Gem.source_index called from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.12/lib/bundler/shared_helpers.rb:84. 
like image 914
Kevin H Avatar asked May 19 '11 22:05

Kevin H


People also ask

What does gem install rails do?

Installing Gems The install command downloads and installs the gem and any necessary dependencies then builds documentation for the installed gems. Here the drip command depends upon the rbtree gem which has an extension.

How do I install specific versions of gems?

Use `gem install -v` You may already be familiar with gem install , but if you add the -v flag, you can specify the version of the gem to install. Using -v you can specify an exact version or use version comparators.

Where are gems installed rails?

When you use the --user-install option, RubyGems will install the gems to a directory inside your home directory, something like ~/. gem/ruby/1.9. 1 . The commands provided by the gems you installed will end up in ~/.

What is gem install?

gem install , in its simplest form, does something kind of like this. It grabs the gem and puts its files into a special directory on your system. You can see where gem install will install your gems if you run gem environment (look for the INSTALLATION DIRECTORY: line):


1 Answers

This worked for me: downgrade rubygems:

gem update --system 1.6.2 

found this advice at: Gem.source_index is deprecated, use Specification #34

like image 130
dsaronin Avatar answered Oct 15 '22 11:10

dsaronin