Gem Dependencies

Eric Hodel | Mon, 23 Jun 2008 22:28:40 GMT

I was chatting with Yehuda Katz, and somehow we ended up talking about speed:

Eric Hodel: I don’t worry about inheritance

Eric Hodel: or speed, for that matter

Yehuda Katz: heh

Yehuda Katz: that’s why you wrote RubyInline?

Eric Hodel: Ryan wrote RubyInline because, roughly, “How hard could it be?”

Eric Hodel: and an intense hatred of C

This got me thinking, how long did it take from RubyInline to be written until it was actually used? The RubyGems answer is 151 days, and by ParseTree, but RubyInline is actually about 2 years older than its gem, first committed on 2002/09/05.

To figure this out, I wrote a script that walks all the gems and figures out when a gem was first released, when a gem was first mentioned in a dependency, and the time between the two. Today, the figures are:

681 of 3234 gems used as dependencies (21%)
average time to first use is 148 days
maximum time to first use is 1332 (dnssd)

You can get the full output in the gem dependency report (which updates weekly), and download the gem dependency script too.

Posted in ,  | no comments

RubyGems 1.2.0

Eric Hodel | Sun, 22 Jun 2008 03:32:00 GMT

Announce: RubyGems Release 1.2.0

Release 1.2.0 adds new features and fixes some bugs.

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

Bugs Fixed:

  • File modes from gems are now honored, patch #19737
  • Marshal Gem::Specification objects from the future can now be loaded.
  • A trailing / is now added to remote sources when missing, bug #20134
  • Gems with legacy platforms will now be correctly uninstalled, patch #19877
  • gem install --no-wrappers followed by gem install --wrappers no longer overwrites executables
  • gem pristine now forces reinstallation of gems, bug #20387
  • RubyGems gracefully handles ^C while loading .gemspec files from disk, bug #20523
  • Paths are expanded in more places, bug #19317, bug #19896
  • Gem::DependencyInstaller resets installed gems every install, bug #19444
  • Gem.default_path is now honored if GEM_PATH is not set, patch #19502

Other Changes Include:

  • setup.rb
    • stub files created by RubyGems 0.7.x and older are no longer removed. When upgrading from these ancient versions, upgrade to 1.1.x first to clean up stubs.
    • RDoc is no longer required until necessary, patch #20414
  • gem server
    • Now completely matches the output of gem generate_index and has correct content types
    • Refreshes from source directories for every hit. The server will no longer need to be restarted after installing gems.
  • `gem query—details` and friends now display author, homepage, rubyforge url and installed location
  • gem install without -i no longer reinstalls dependencies if they are in GEM_PATH but not in GEM_HOME
  • Gem::RemoteFetcher now performs persistent connections for HEAD requests, bug #7973

For a full list of changes to RubyGems and the contributor for each change, see the ChangeLog file.

Special thanks to Chad Wooley for backwards compatibility testing and Luis Lavena for continuing windows support.

How can I get RubyGems?

NOTE: If you have installed RubyGems using a package system you may want to install a new RubyGems through the same packaging system.

If you have a recent version of RubyGems (0.8.5 or later), then all you need to do is:

$ gem update --system   (you might need to be admin/root)

(Note: You may have to run the command twice if you have any previosly installed rubygems-update gems).

If you have an older version of RubyGems installed, then you can still do it in two steps:

$ gem install rubygems-update  (again, might need to be admin/root)
$ update_rubygems              (... here too)

If you don’t have any gems install, there is still the pre-gem approach to getting software … doing it manually:

  1. DOWNLOAD FROM: http://rubyforge.org/frs/?group_id=126
  2. UNPACK INTO A DIRECTORY AND CD THERE
  3. INSTALL WITH: ruby setup.rb (you may need admin/root privilege)

To File Bugs

The RubyGems bug tracker can be found on RubyForge at: http://rubyforge.org/tracker/?func=add&group_id=126&atid=575

When filing a bug, `gem env` output will be helpful in diagnosing the issue.

If you find a bug where RubyGems crashes, please provide debug output. You can do that with `gem—debug the_command`.

Thanks

Keep those gems coming!

Jim & Chad & Eric (for the RubyGems team)

Posted in ,  | 9 comments

3000 Gems

Eric Hodel | Mon, 14 Apr 2008 22:39:12 GMT

Earlier this month the 3000th gem was released! Here’s how the repository has grown since its early days:

Gem counts 2008-03

Posted in ,  | 2 comments

RubyGems 1.1.1

Eric Hodel | Fri, 11 Apr 2008 05:19:00 GMT

Release 1.1.1 fixes some bugs.

Bugs Fixed:

  • Gem.prefix now returns non-nil only when RubyGems was installed outside sitelibdir or libdir.
  • The gem server gem list now correctly links to gem details.
  • gem update --system now passes --no-format-executable to setup.rb.
  • Gem::SourceIndex#refresh! now works with multiple gem repositories.
  • Downloaded gems now go into --install-dir's cache directory.
  • Various fixes to downloading gem metadata.
  • gem install --force now ignores network errors too.
  • gem pristine now rebuilds extensions.
  • gem update --system now works on virgin Apple ruby.
  • Gem::RemoteFetcher handles Errno::ECONNABORTED.
  • Printing of release notes fixed.

For a full list of changes to RubyGems including credits, see the ChangeLog file.

How can I get RubyGems?

NOTE: If you have installed RubyGems using a package system you may want to install a new RubyGems through the same packaging system.

If you have a recent version of RubyGems (0.8.5 or later), then all you need to do is:

  $ gem update --system   (you might need to be admin/root)

(Note: You may have to run the command twice if you have any previosly installed rubygems-update gems).

If you have an older version of RubyGems installed, then you can still do it in two steps:

  $ gem install rubygems-update  (again, might need to be admin/root)
  $ update_rubygems              (... here too)

If you don’t have any gems install, there is still the pre-gem approach to getting software … doing it manually:

  1. DOWNLOAD FROM: rubyforge.org/frs/?group_id=126
  2. UNPACK INTO A DIRECTORY AND CD THERE
  3. INSTALL WITH: ruby setup.rb (you may need admin/root privilege)

To File Bugs

The RubyGems bug tracker can be found on RubyForge at: rubyforge.org/tracker/?func=add&group_id=126&atid=575

When filing a bug, gem env output will be helpful in diagnosing the issue.

If you find a bug where RubyGems crashes, please provide debug output. You can do that with gem --debug the_command.

Thanks

Keep those gems coming!

— Jim & Chad & Eric (for the RubyGems team)

Posted in ,  | 6 comments

RubyGems 1.1.0 on Apple Ruby

Eric Hodel | Sun, 30 Mar 2008 03:04:14 GMT

There is a bug on updating RubyGems to 1.1.0 on Apple’s Ruby. The workaround is to run:

sudo gem install rubygems-update
sudo update_rubygems

Posted in  | 3 comments

RubyGems 1.1.0

Eric Hodel | Sat, 29 Mar 2008 08:41:00 GMT

Announce: RubyGems Release 1.1.0

Release 1.1.0 adds some new features and fixes some bugs.

New features:

  • RubyGems now uses persistent connections on index updates. Index updates are much faster now.
  • RubyGems only updates from a latest index by default, cutting candidate gems for updates to roughly 1/4 (at present). Index updates are even faster still.
    • gem list -r may only show the latest version of a gem, add --all to see all gems.
  • gem spec now extracts specifications from .gem files.
  • gem query --installed to aid automation of checking for gems.

Bugs Fixed:

  • RubyGems works with both Config and RbConfig now.
  • Executables are now cleaned upon uninstall.
  • You can now uninstall from a particular directory.
  • Updating from non-default sources fixed.
  • Executable stubs now use ruby install name in shebang.
  • gem unpack checks every directory in Gem.path now.
  • gem install now exits with non-zero exit code when appropriate.
  • gem update only updates gems that need updates.
  • gem update doesn't force remote-only updates.
  • gem update handles dependencies properly when updating.
  • Gems are now loaded in Gem.path order.
  • Gem stub scripts on windows now work outside Gem.bindir.
  • gem sources -r now works without network access.

Other Changes Include:

  • RubyGems now requires Ruby > 1.8.3.
  • Release notes are now printed upon installation.
  • gem env path now prints a usable path.
  • gem install reverts to local-only installation upon network error.
  • Tar handling code refactoring and cleanup.
  • Gem::DependencyInstaller's API has changed.

For a full list of changes to RubyGems, see the ChangeLog file.

How can I get RubyGems?

NOTE: If you have installed RubyGems using a package system you may want to install a new RubyGems through the same packaging system.

If you have a recent version of RubyGems (0.8.5 or later), then all you need to do is:

  $ gem update --system   (you might need to be admin/root)

(Note: You may have to run the command twice if you have any previosly installed rubygems-update gems).

If you have an older version of RubyGems installed, then you can still do it in two steps:

  $ gem install rubygems-update  (again, might need to be admin/root)
  $ update_rubygems              (... here too)

If you don't have any gems install, there is still the pre-gem approach to getting software … doing it manually:

  1. DOWNLOAD FROM: rubyforge.org/frs/?group_id=126
  2. UNPACK INTO A DIRECTORY AND CD THERE
  3. INSTALL WITH: ruby setup.rb (you may need admin/root privilege)

To File Bugs

The RubyGems bug tracker can be found on RubyForge at: rubyforge.org/tracker/?func=add&group_id=126&atid=575

When filing a bug, gem env output will be helpful in diagnosing the issue.

If you find a bug where RubyGems crashes, please provide debug output. You can do that with gem --debug the_command.

Thanks

Keep those gems coming!

— Jim & Chad & Eric (for the RubyGems team)

Posted in ,  | 10 comments

.au Sprint

Eric Hodel | Tue, 11 Mar 2008 09:16:16 GMT

I spent Saturday and Sunday at the Sydney Rubinius sprint, and it was quite productive. Not only were local beers sampled, but we also got some good work done.

Lincoln Stoll helped me shake the last bugs out of RubyGems, so we integrated it into Rubinius. We decided to make it a subcommand rbx gem like rbx compile or rbx describe. There are still a few things broken in RubyGems, namely installing gems with extensions because mkmf.rb doesn’t work in Rubinius.

Lincoln also pointed out and gave me patches for a few backwards-compatibility problems with RDoc, so now both RubyGems and RDoc work on Rubinius.

Upon my return next week I’ll be cooking up a release of RubyGems with a handful of bug fixes and persistent connection support for RubyGems’ HTTP fetching which will make those incremental updates quite a bit faster.

Posted in ,  | 1 comment

RubyGems on Rubinius

Eric Hodel | Sun, 13 Jan 2008 06:36:00 GMT

Friday I passed an important milestone for RubyGems on Rubinius, test/test_gem.rb ran to completion! Here are the dots to prove it:

$ ~/Links/RUBINIUS/shotgun/rubinius -Ilib:test test/test_gem.rb
Loaded suite test/test_gem
Started
.................................
Finished in 18.667198 seconds.

33 tests, 56 assertions, 0 failures, 0 errors

These tests include building, installing, and activating a Gem, so it should be possible now to use RubyGems in Rubinius. Unfortunately, the `gem` command doesn't work yet. That will be among my next tasks.

The final holdup for these RubyGems tests was a Dir.glob that handled {}. Finishing this off should also allow rake to work, according Evan's recent work on rake.

A full run of all RubyGems tests reports:

100 tests, 221 assertions, 6 failures, 13 errors

A full run with MRI is 533 tests, 1816 assertions. The 433 missing tests are due to a missing feature of Module#module_function in Rubinius that prevents the remaining test files from loading.

If you'd like to duplicate my results, here's how:

Posted in ,  | 3 comments

My Favorite gem Commands

Eric Hodel | Mon, 24 Dec 2007 03:14:00 GMT

My two favorite gem commands are gem install -i ~/tmp/gems and gem which, followed closely by the gem fetch gemname; gem unpack gemname combo.

Now that the install command automatically installs all the necessary dependencies into the installation directory, it's easy to pull down a gem and play with it without having to do the work of cleaning out all it's dependencies from your main repository. A simple rm -r ~/tmp/gems is all it takes to clean up.

While I seldom have a need to use it, gem which tells you which file would get loaded when you require something. For example:

$ gem list activerecord

*** LOCAL GEMS ***

activerecord (1.15.6, 1.15.3)

$ gem which active_record
(checking gem activerecord-1.15.6 for active_record)
/System/Library/Frameworks/[...]/gems/activerecord-1.15.6/lib/active_record.rb

Finally, if I just want to poke at some code from a gem without bothering to poke through a gem repository, you can use gem fetch gemname; gem unpack gemname and you'll have a gemname-version directory with the gem sitting right in front of you.

Posted in  | no comments

RubyGems 1.0.1

Eric Hodel | Fri, 21 Dec 2007 03:25:37 GMT

Release 1.0.1 fixes a few bugs.

Bugs Fixed:

  • Installation on Ruby 1.8.3 through 1.8.5 fixed
  • gem build on 1.8.3 fixed

Other Changes Include:

  • Since RubyGems 0.9.5, RubyGems is no longer supported on Ruby 1.8.2 or older, this is official in RubyGems 1.0.1.

How can I get RubyGems?

NOTE: If you have installed RubyGems using a package you may want to install a new RubyGems through the same packaging system.

If you have a recent version of RubyGems (0.8.5 or later), then all you need to do is:

gem update --system   (you might need to be admin/root)

(Note: You may have to run the command twice if you have any previosly installed rubygems-update gems).

If you have an older version of RubyGems installed, then you can still do it in two steps:

gem install rubygems-update  (again, might need to be admin/root)
update_rubygems              (... here too)

If you don’t have any gems install, there is still the pre-gem approach to getting software … doing it manually:

To File Bugs

The RubyGems bug tracker can be found on RubyForge at: http://rubyforge.org/tracker/?func=add&group_id=126&atid=575

When filing a bug, gem env output will be helpful in diagnosing the issue.

If you find a bug where RubyGems crashes, please provide debug output. You can do that with gem --debug the_command.

Thanks

Keep those gems coming!

—Jim & Chad & Eric (for the RubyGems team)

Posted in ,  | 3 comments

Older posts: 1 2 3 4