jnopaja
jnopaja

Reputation: 11

rubygems automatically updating on install

I am currently managing an installation of ruby 1.9.3 in red hat 5.

I have found that, during a specific gem install, ruby is trying to download and install the latest version of a particular required gem.

I have attempted to prevent the updating of gems using the --conservative flag, however, this does not seem to work.

The gem in question requires a specific version of launchy which, in turn, requires a specific version of addressable.

The versions of these gems that are already installed meet the requirements of the gem I am attempting to install. However, the gem command attempts to download and install the latest version of addressable.

This is a problem, because the latest addressable requires public_suffix, which only installs in ruby 2.x and greater.

The gem that I am trying to install is a custom gem, and thus I have modified the gemspec, and found that removing the launchy requirement fixes the issue. However, launchy is a required gem, so the requirement needs to stay in the dependency list.

Has anyone had any experience with dealing with this particular version of ruby and gem and found issues with dependencies?

I have tried going in and modifying gemspec for launchy and addressable in the installed gems dirs, but have found that the issue is with the gem install command attempting to update/install the latest gems despite giving it flags telling it otherwise.

ruby 1.9.3 gem 1.8.23

Upvotes: 0

Views: 68

Answers (2)

jnopaja
jnopaja

Reputation: 11

After some additional research prompted by the above responses, it was determined that an outdated version of Hoe was causing the generated gem to try and install the latest dependencies. After moving away from Hoe to manage dependencies and versions, my issue has been solved.

Some of the dependency management classes seem to behave quite differently, so that's probably the first place to look.

Upvotes: 1

Simon
Simon

Reputation: 128

Use the -v flag to specify the exact version to install:

gem install your-custom-gem -v 1.1

Upvotes: 0

Related Questions