RubyGems 0.9.5

Eric Hodel | Tue, 20 Nov 2007 00:35:31 GMT

Posted in ,

RubyGems 0.9.5 adds several new features and fixes several bugs.

To upgrade to the latest RubyGems:

gem update --system

To upgrade to the latest RubyGems by hand:

  1. Download RubyGems from http://rubyforge.org/frs/?group_id=126&release_id=16500
  2. gem install rubygems-update-0.9.5.gem
  3. update_rubygems

To install RubyGems from scratch:

  1. Download RubyGems source .tgz or .zip file from http://rubyforge.org/frs/?group_id=126&release_id=16500
  2. Unpack the source .tgz or .zip
  3. ruby setup.rb

To install RubyGems on Ruby 1.9 update your ruby trunk checkout and reinstall.

To file bugs:

http://rubyforge.org/tracker/?func=add&group_id=126&atid=575

When filing a bug, gem env output will be helpful in diagnosing the issue.

If you find a bug where RubyGems crashes, please provide debug output. You can do that with gem --debug the_command. For example:

<samp>$ gem --debug unknown_command
Exception `RuntimeError' at [...]/rubygems/command_manager.rb:114 - Unknown command unknown_command
ERROR:  While executing gem ... (RuntimeError)
    Unknown command unknown_command
        [...]/rubygems/command_manager.rb:114:in `find_command'
        [...]/rubygems/command_manager.rb:103:in `process_args'
        [...]/rubygems/command_manager.rb:74:in `run'
        [...]/rubygems/gem_runner.rb:39:in `run'
        /usr/local/bin/gem:22</samp>

Changes

Select new features include:

  • Automatic installation of platform gems
  • New bandwidth and memory friendlier index file format
  • “Offline” mode (—no-update-sources)
  • Bulk update threshold can be specified (-B,—bulk-threshold)
  • New gem fetch command
  • gem now has “really verbose” output when you specify -v
  • Ruby 1.9 compatible

Other changes include:

  • Time::today is deprecated and will be removed at a future date
  • gem install --include-dependencies (-y) is now deprecated since it is the default, use—ignore-dependencies to turn off automatic dependency installation
  • gem.bat and bin stubs on mswin platforms are improved and compatible with the One-Click Installer
  • Multi-version diamond dependencies only are installed once
  • Bulk index updates take less memory
  • -V now enables verbose instead of -v to avoid collision with—version’s -v
  • gem install -i makes sure all depenencies are installed
  • gem update --system reinstalls into the prefix it was originally installed in
  • gem update --system respects—no-rdoc and—no-ri flags
  • HTTP basic authentication support for proxies
  • Gem::Specification#platforms should no longer be a String, use Gem::Platform::CURRENT when building binary gems instead
  • gem env has more diagnostic information
  • require ‘rubygems’ loads less code
  • sources.gem is gone, RubyGems now uses built-in defaults
  • gem install --source will no longer add—source by default, use gem sources --add to make it a permanent extra source
  • gem query (list) no longer prints details by default
  • Exact gem names are matched in various places
  • mkrf extensions are now supported
  • A gem can depend on a specific RubyGems version
  • gem_server is now gem server
  • gemlock is now gem lock
  • gem_mirror is now gem mirror
  • gemwhich is now gem which
  • gemri is no longer included with RubyGems
  • index_gem_repository.rb is now gem generate_index
  • gem performs more validation of parameters
  • Removed gem* commands are now replaced with stubs that warn
  • Custom rdoc styles are now supported
  • Gem indexer no longer removes quick index during index creation
  • Kernel#require only rescues a LoadError for the file being required now
  • gem dependencies can now display some information for remote gems

Notes and issues:

  • Old gem scripts (gem_mirror, gem_server, gemlock, gemri, gemwhich, index_gem_repository.rb) are not cleaned up
  • There still appears to be a bug related to bulk updates of YAML indexes

Special Thanks

  • Daniel Berger for win32 support and testing
  • Luis Lavena for win32 support and testing
  • Tom Copeland for help testing and releasing the new indexer
  • Wilson Bilkovich for the new Marshal index format
  • To the rest of the RubyGems bug reporters and patch contributors

The full set of changes including contributors is included in the ChangeLog.

Platforms

RubyGems now automatically handles platform gems. This means that gem install will no longer prompt for gem selection. RubyGems uses Ruby’s built-in configuration to match the running ruby’s platform to choose the correct gem to install. The automatically chosen platform may be overridden with the—platform option.

The dependency, fetch, install, outdated, specification, uninstall and update commands all respond to—platform.

For more information, see gem help platforms

Thanks

Keep those gems coming!

—Jim & Chad & Eric (for the RubyGems team)

13 comments

Comments RSS FEED

Awesome!

Can you elaborate on the -p option? I think this will be helpful to those behind a corporate (Microsoft) firewall. Sometimes a username and password is required. Is there a way to specify the username and password along with -p? Or will it prompt as necessary?

Thanks again for maintaining RubyGems for the benefit of the whole community.

Jeff

Jeff said about 1 hour later

The best way to use proxies with RubyGems is to set the HTTP_PROXY, HTTP_PROXY_USER and HTTP_PROXY_PASS to specify the username and password respectively. I think you can specify username and password in the URL (http://user:pass@host), but I don’t think that will work in Ruby 1.9.

Currently OpenURI (which RubyGems uses for most HTTP requests) isn’t able to use NTLM authentication.

Eric Hodel said about 6 hours later

Great job!! I really like this version. It is so much improvement compare to the previous version. I can see the memory consume decrease dramatically on my windows platform( now the ruby process(1.8) use only ~8MB ). Thanks you!!!

sgwong said about 7 hours later

Thank you for another great version.

Dejan Dimic said about 21 hours later

Hi, on Windows platform are Rubygems 0.9.5 breaking mongrel installation. Perhaps because of crazy name like: mongrel-1.1-x86-mswin32-60 but mongrel is in mongrel-1.1-mswin32. I know that rubygems are now selecting gems for platform, but what if I wnat to have a chance to select my prefered package type (like mswin32 instead of ruby or jruby)?

Here’s error I get: c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require’: no such file to load—c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1-x86-mswin32-60/lib/mongrel/init.rb (MissingSourceFile)

Thankx Laco

Laco said 1 day later

Hi Eric,

I wish I would read the previous message before updating to 0.9.5. Is there a way to get back to 0.9.4? I couldn’t even install mongrel again.

Thanks Juan

Juanma Cervera said 1 day later

Laco: You’ll need to file a bug. Follow the instructions right up there at the top.

Juanma: Download and install RubyGems 0.9.4 to move back to 0.9.4.

Eric Hodel said 1 day later

Manual trackback: http://www.martin-probst.com/blog/2007/11/21/rubygems-upgrade-0-9-5

I had the same problem as Laco and fixed it by reinstalling all gems.

Martin Probst said 1 day later

By the way the trackback had to be manual as your blog does include the required RDF markup for trackback discovery, but the markup lacks the ‘trackback:ping’ attribute required for trackbacks to work (see http://www.sixapart.com/pronet/docs/trackback_spec).

Martin Probst said 1 day later

Martin: I disabled trackbacks on purpose since they were 99% spam. Maybe there’s something still lingering.

Eric Hodel said 1 day later

Laco: the bug was fixed in rubygems svn.

For the moment, stick to 0.9.4 for Windows until 0.9.5.1 shows sometime soon (I hope) :-)

Luis Lavena said 2 days later

This one got me too, using InstantRails on Windows. Took me a bit to figure out how to get back to 0.9.4, if anyone is wondering you have to download it, gem install it, and then run “ruby setup.rb” from the gems directory, from inside your ruby console.

Scott Miller said 2 days later

Luis Lavena put me on track and refered me to this solution to the Windows/Mongrel problem in the comments above.

For me, however, I could not uninstall 0.9.5. For what I could tell, there is no gem unistall—system command. (did you consider adding that command in a future version?)

What worked for me was a complete reinstall of ruby and gems.

Related post: http://www.ruby-forum.com/topic/133033

Jesper Rønn-Jensen Blog: www.justaddwater.dk

Jesper Rønn-Jensen said 8 days later

Comments are disabled