The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
/usr/bin/gems reports "Gem::manage_gems is deprecated"

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Eric Hodel

Posts: 660
Nickname: drbrain
Registered: Mar, 2006

Eric Hodel is a long-time Rubyist and co-founder of Seattle.rb.
/usr/bin/gems reports "Gem::manage_gems is deprecated" Posted: Jan 15, 2009 6:57 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Eric Hodel.
Original Post: /usr/bin/gems reports "Gem::manage_gems is deprecated"
Feed Title: Segment7
Feed URL: http://blog.segment7.net/articles.rss
Feed Description: Posts about and around Ruby, MetaRuby, ruby2c, ZenTest and work at The Robot Co-op.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Eric Hodel
Latest Posts From Segment7

Advertisement

I was looking through my search keywords and found that a lot of people were searching for:

/usr/bin/gem:10:Warning: Gem::manage_gems is deprecated and will be removed on or after March 2009.

To fix this you need to remove /usr/bin/gem and symlink it to the proper gem executable.

Since RubyGems 1.0 the gem executable has been installed with a name matching your ruby executable. Often when you install Ruby through a packaging system the ruby executable is installed with a version appended like "ruby18" and a symlink named "ruby" points to the real ruby. For the "gem" executable you need to do this yourself.

To prevent problems like this in the future, read RubyGems release notes when you upgrade. RubyGems now prints them out after gem update --system and you can always find the RubyGems release notes posted as news items on RubyForge.

First, determine where the real gem executable is. You can figure out what the ruby executable's real name is like this:

$ gem env | grep 'RUBY EXEC'
  - RUBY EXECUTABLE: /usr/bin/ruby18

So your gem executable should really live at 'gem18'. Try it:

$ gem18 env | grep 'RUBY EXEC'
  - RUBY EXECUTABLE: /usr/bin/ruby18

To be extra sure, compare the full gem18 env output and gem env output.

To fix the warning, remove the gem executable and replace it with a symlink to gem18.

sudo rm /usr/bin/gem
sudo ln -s /usr/bin/gem18 /usr/bin/gem

Now the warning should be gone.

Remember, to prevent problems like this in the future, read RubyGems' output when you upgrade. RubyGems also prints the release notes when you run gem update --system now.

PS: If you're seeing rake give this warning, that's an entirely different issue. Jim Weirich has a fixed rake in his release queue and it should be out before Gem::manage_gems goes away.

Read: /usr/bin/gems reports "Gem::manage_gems is deprecated"

Topic: Introducing extprot: extensible binary protocols for cross-language communication and long-term... Previous Topic   Next Topic Topic: Let Me Test Your Rails/Ruby App

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use