RubyGems' Gem Activation is Changing

drbrain | Sat, 19 Feb 2011 19:18:00 GMT

Posted in

We've changed the way gem activation works in RubyGems for the upcoming 1.6 release (at the end of the month) for RubyGems 1.5 and earlier:

$ ruby -d -S thin start
[…]
>> Using rails adapter
[…]
Exception `Gem::LoadError' at /Library/Ruby/Site/1.8/rubygems.rb:274 - can't activate rack (~> 1.0.0, runtime) for ["actionpack-2.3.5", "rails-2.3.5"], already activated rack-1.2.1 for ["thin-1.2.5"]
Missing the Rails 2.3.5 gem. Please `gem install -v=2.3.5 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.

With RubyGems from trunk:

$ ruby -I ~/Work/git/rubygems/lib -S thin start
>> Using rails adapter
>> Thin web server (v1.2.5 codename This Is Not A Web Server)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop

RubyGems now lazily activates gems so a gem's load paths will not be added to $LOAD_PATH until its files are needed.

We would like testers for our changes to gem activation. If you would like to help us test you will not be able to release gems. Gem authors should be prepared to downgrade to RubyGems 1.5.2 if you test the trunk version.

If you wish to test the new version of RubyGems you will need to check out the repository using git from git://github.com/rubygems/rubygems.git then run ruby setup.rb. You can also test without upgrading by using ruby -I path/to/rubygems/lib. If you're running a ruby executable such as thin run ruby -I path/to/rubygems/lib -S thin.

Please report any issues you have on the mailing list (subscribe here) or in the #rubygems channel on chat.freenode.net (check that drbrain is active).

When you're done testing you can downgrade to RubyGems 1.5.2 using the Downgrade Recipe in the UPGRADING document.

Comments RSS FEED

Comments are disabled