avoid reinstalling gem (if its already installed?)

R

Rob Sanheim

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.

rsanheim@ares:~ $ 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...

rsanheim@ares:~ $ sudo gem list|grep bacon
bacon (1.0.0, 0.9.0)

rsanheim@ares:~ $ 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
 
E

Eric Hodel

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?
 
R

Rob Sanheim

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
 
E

Eric Hodel

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.
 
A

Avdi Grimm

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top