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.
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.
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.
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 ~/.
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):
This worked for me: downgrade rubygems:
gem update --system 1.6.2
found this advice at: Gem.source_index is deprecated, use Specification #34
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With