Avoid reinstalling gem (if its already installed?)

Is there a way to have rubygems not reinstall a gem if the latest
version is already installed?

For example, I want the second ‘install’ below to simply say ‘already
installed’ and exit successfully.

[email protected]:~ $ sudo gem install bacon
Successfully installed bacon-1.0.0
1 gem installed
Installing ri documentation for bacon-1.0.0…
Installing RDoc documentation for bacon-1.0.0…

[email protected]:~ $ sudo gem list|grep bacon
bacon (1.0.0, 0.9.0)

[email protected]:~ $ sudo gem install bacon
Successfully installed bacon-1.0.0
1 gem installed
Installing ri documentation for bacon-1.0.0…
Installing RDoc documentation for bacon-1.0.0…

thanks,

  • Rob

On Jul 24, 2008, at 13:26 PM, Rob S. wrote:

Is there a way to have rubygems not reinstall a gem if the latest
version is already installed?

For example, I want the second ‘install’ below to simply say ‘already
installed’ and exit successfully.

Why do you care?

On Thu, Jul 24, 2008 at 7:40 PM, Eric H. [email protected]
wrote:

On Jul 24, 2008, at 13:26 PM, Rob S. wrote:

Is there a way to have rubygems not reinstall a gem if the latest
version is already installed?

For example, I want the second ‘install’ below to simply say ‘already
installed’ and exit successfully.

Why do you care?

I’m going to be setting up machines with stock set of gems, and then
periodically refreshing them with a revised list. I’d like to have
gem skip the ones it already has for efficiency.

So I take it I would have to use the gem api to do this?

  • Rob

On Jul 24, 2008, at 17:30 , Rob S. wrote:

for efficiency

If only I could wipe this series of words from people’s brains…

On Jul 24, 2008, at 17:30 PM, Rob S. wrote:

Why do you care?

I’m going to be setting up machines with stock set of gems, and then
periodically refreshing them with a revised list. I’d like to have
gem skip the ones it already has for efficiency.

So I take it I would have to use the gem api to do this?

No, your “stock set of gems” should be a gem that only has
dependencies on other gems.

On Thu, Jul 24, 2008 at 8:41 PM, Ryan D. [email protected]
wrote:

If only I could wipe this series of words from people’s brains…

Seriously, like our users who have this crazy notion that web pages
should take less than two minutes to load. If only we could use Jedi
mind tricks on them…

It’s like they think programmers are actually supposed to make life
easier for them, or something.

:wink:


Avdi

Home: http://avdi.org
Developer Blog: http://avdi.org/devblog/
Twitter: http://twitter.com/avdi
Journal: http://avdi.livejournal.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs