RubyGems Roundup: 1.2 Release, JRuby, Faster Gem Releases
Eric Hodel (watch InfoQ's interview with Eric) has released RubyGems 1.2. The release notes list a few new features:
Users of JRuby currently need to do a bit more work to get to use RubyGems 1.2. Vladimir Sizikov provides a workaround to get RubyGems 1.2 to run on current JRuby 1.1.x releases:
Note: if you want to avoid following these steps, simply wait for JRuby 1.1.3, which will ship with RubyGems 1.2. A quick look at the Ruby 1.9 Changelog shows the trunk version of 1.9.x was upgraded to 1.2 as well.
Finally, Tom Copeland announces an improvement of RubyForge's Gems infrastructure:
Discuss
To update from a recent version of RubyGems (at least 0.8.5), the release notes give this command:
- RubyGems no longer performs bulk updates and instead only fetches the gemspec files it needs. Alternate sources will need to upgrade to RubyGems 1.2 to allow RubyGems to take advantage of the new metadata updater. If a pre 1.2 remote source is in the sources list, RubyGems will revert to the bulk update code for compatibility.
- RubyGems now has runtime and development dependency types. Use
#add_development_dependencyand#add_runtime_dependency. All typeless dependencies are considered to be runtime dependencies.- RubyGems will now require
rubygems/defaults/operating_system.rbandrubygems/defaults/#{RBX_ENGINE}.rbif they exist. This allows packagers and ruby implementers to add custom behavior to RubyGems via these files. (If the RubyGems API is insufficient, please suggest improvements via the RubyGems list.)/etc/gemrc(and windows equivalent) for global settings- setup.rb now handles‚--vendor and‚--destdir for packagers
- gem stale command that lists gems by last access time
$ gem update --system (you might need to be admin/root)Installing Gems from GitHub is easier with RubyGems 1.2, as the GitHub blog notes:
Do yourself a favor and run the following commands if you're a Ruby guy/gal.$ sudo gem update --systemYou're now able to install gems from GitHub directly without specifying the source, just like you would if you were installing them from RubyForge.
$ gem sources -a http://gems.github.com
Users of JRuby currently need to do a bit more work to get to use RubyGems 1.2. Vladimir Sizikov provides a workaround to get RubyGems 1.2 to run on current JRuby 1.1.x releases:
jruby -S gem update --systemThis is just the first step - Vladimir's mail continues with the full explanation of which steps to follow or files to download to get RubyGems 1.2 to work.
this standard command to upgrade the rubygems just doesn't work with JRuby 1.1.2, due to bug in rubygems 1.1.1. Luckily, there is a workaround:
jruby -S gem install rubygems-update -v 1.1.1
Once this update is installed, then proceed with the main update command listed above.
Note: if you want to avoid following these steps, simply wait for JRuby 1.1.3, which will ship with RubyGems 1.2. A quick look at the Ruby 1.9 Changelog shows the trunk version of 1.9.x was upgraded to 1.2 as well.
Finally, Tom Copeland announces an improvement of RubyForge's Gems infrastructure:
The idea was that the filenames of new gems will be tracked and RubyForge will serve those gems locally rather than redirecting the request out to the mirrors. [..] The gem is being served without waiting for all the mirrors to be updated. Now I just need to write a little code to remove file names from the list after 24 hours or so; by that time the gem will have been sync'd out.
So, to summarize, gems will now be available very soon after they're released.
Community comments
Educational Content
Concurrency in Clojure
Stuart Halloway May 17, 2013
Confessions of an Agile Addict
Ole Friis Østergaard May 16, 2013
Web Development: You're Doing It Wrong
Stefan Tilkov May 16, 2013
Programming The Feynman Way
Ben Evans May 15, 2013





Hello stranger!
You need to Register an InfoQ account or Login to post comments. But there's so much more behind being registered.Get the most out of the InfoQ experience.
Tell us what you think