InfoQ

News

RubyGems Roundup: 1.2 Release, JRuby, Faster Gem Releases

Posted by Werner Schuster on Jun 28, 2008 04:42 PM

Community
Ruby
Topics
Runtimes,
RubyGems
Tags
JRuby,
RubyGems,
Releases,
Ruby1.9
Eric Hodel (watch InfoQ's interview with Eric) has released RubyGems 1.2. The release notes list a few new features:
  • 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_dependency and #add_runtime_dependency. All typeless dependencies are considered to be runtime dependencies.
  • RubyGems will now require rubygems/defaults/operating_system.rb and rubygems/defaults/#{RBX_ENGINE}.rb if 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
To update from a recent version of RubyGems (at least 0.8.5), the release notes give this command:
$ 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 --system 
$ gem sources -a http://gems.github.com
You're now able to install gems from GitHub directly without specifying the source, just like you would if you were installing them from RubyForge.

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 --system
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.
This 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.
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.

No comments

Reply

Exclusive Content

SOA Governance: An Enterprise View

Michael Poulin explains the necessity for SOA governance to ensure an Enterprise SOA's success, relying on concepts from the OASIS SOA Reference Model and Reference Architecture.

Developing Portlets using JSF, Ajax, and Seam (Part 2 of 3)

This article covers setting up a RichFaces portlet using JBoss Portlet Container and JBoss Portlet Bridge, deploying a RichFaces portlet, and RichFaces capabilities.

Scalability Worst Practices

This article discusses scalability worst pratices including The Golden Hammer, Resource Abuse, Big Ball of Mud, Dependency Management, Timeouts, Hero Pattern, Not Automating, and Monitoring.

Do the Hustle

Obie Fernandez shares his experience selling consulting services for both Thoughtworks and Hashrocket and give tips how Ruby developers can work with clients.

Natural Laws of Software Development - Deriving Agile Practices

Jeffries and Hendrickson derive Agile practices from the natural laws of software development. They don't just say "Be Agile!", but they explain why Agile practices make perfect sense.

Jinesh Varia About Amazon Alexa Web Service's Architecture

Jinesh Varia talks about the architecture of one of Amazon's web services called Alexa. Jinesh explains how Amazon has reached scalability, performance and reduced costs for the Alexa service.

"We Suck Less!" Is Not Enough

David Douglas and Robin Dymond discuss about companies adopting Agile, but don't go all the way, resulting in failure and rejection of it, and predictably having a negative impact on Agile's future.

The Development of a New Car at Toyota

Kenji Hiranabe talks about Toyota's development process of a new car. Kenji shares his experience meeting Nobuaki Katayama, former Chief Engineer at Toyota, and the lessons he learned from him.