The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
RubyGems 1.4 vs Ruby 1.9

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.
RubyGems 1.4 vs Ruby 1.9 Posted: Jan 4, 2011 4:13 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Eric Hodel.
Original Post: RubyGems 1.4 vs Ruby 1.9
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

Ruby 1.9.2's gem_prelude is interfering with RubyGems' loading causing errors when during the loading of RubyGems 1.4. In Ruby 1.9.1 this wasn't a problem because gem_prelude loaded all the latest gems into $LOAD_PATH at startup time. This caused problems where a gem depended on a non-latest version.

In Ruby 1.9.2 gem_prelude uses a custom require which loads RubyGems after the first LoadError.

At startup time RubyGems attempts to load three files that may not exist. One for operating-system defaults, one for ruby engine defaults and Win32API to determine where to look for .gemrc.

In Ruby 1.9.2 this causes massive confusion because RubyGems is asked to look up these missing files while only partially loaded.

My solution was to remove loading of .gemrc from RubyGems startup and to avoid attempting to require the OS and ruby engine defaults files at startup time. gem_prelude attempts to load the defaults files when ruby starts so skipping the load is not a problem. Skipping loading .gemrc prevents the gem home and gem path from being set via gemrc.

I also removed support for legacy repositories (those that use YAML and bulk updating) from RubyGems because supporting them requires too many files. I don't think this is an issue.

Those of you that follow along on the rubygems-developers mailing list have seen my post about the features removed.

So far nobody has claimed that setting gem home or gem path via gemrc as a critical feature. Setting the GEM_HOME and GEM_PATH environment variables will work just as well. Removing the feature also allows RubyGems to avoid loading YAML for default operations as the gemrc file is in YAML format.

The best places to look for information about what's going on in RubyGems are the #rubygems channel on freenode and the mailing list and of course the recent RubyGems commits.

If you wish to chime in on these features please use IRC or the mailing list. My blog isn't the best place to keep these kinds of decisions in the public eye.

Read: RubyGems 1.4 vs Ruby 1.9

Topic: HuntFunc Meeting: January 4 Previous Topic   Next Topic Topic: How do I make a command-line tool in Ruby?

Sponsored Links



Google
  Web Artima.com   

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