InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

RubyGems Roundup: 1.2 Release, JRuby, Faster Gem Releases

Posted by Werner Schuster on Jun 28, 2008

Sections
Development
Topics
Runtimes ,
Ruby ,
RubyGems
Tags
Releases ,
Ruby1.9 ,
RubyGems ,
JRuby
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

Watch Thread Reply

Educational Content

Jesper Boeg on Priming Kanban

In this interview, Jesper Boeg, author of the new InfoQ book – Priming Kanban, discusses the keys to using Kanban effectively, and how to get started if you are currently using other approaches.

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.