[Rubygems-developers] Help with Gem Dependencies

Eric Hodel drbrain at segment7.net
Wed Jun 4 06:05:37 EDT 2008


Please don't top post.

On Jun 3, 2008, at 20:34 PM, Bret Pettichord wrote:

> I confirmed that your suggestion works as you describe. Thanks.
>
> However, what i want to do is make "gem install watir" work as a
> one-step install. With your suggestion it is now a 2-step install.
> ("gem update --system; gem install watir")

A quick analysis of the gem repository access log shows only 20% of  
the hits from RubyGems having a version of 0.9.4 or older.  For most  
of your users there is likely no need to update RubyGems.

> I was hoping that i could just add a dependency on rubygems-update to
> the watir gem, but this in itself is not sufficient to fix the
> dependency problem -- i need the full gem update --system.

I believe you need at least RubyGems 0.9.5 to depend on a particular  
version of RubyGems, but this will not force an update of RubyGems  
itself.

> Do you or others know if there is a way to add a dependency on this
> ("gem update --system') as part of the gem install for Watir (by
> changing its gemspec)?

There is not.  User interaction is required to update RubyGems, as a  
packaged RubyGems may have incompatible changes with standard RubyGems.

> Another option would be for us to move to Ruby 1.8.7. which surely has
> other benefits as well.

Upgrading to Ruby 1.8.7 will not change the RubyGems version you are  
using.


More information about the Rubygems-developers mailing list