[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

avoid reinstalling gem (if its already installed?

Rob Sanheim

7/24/2008 8:26:00 PM

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

5 Answers

Eric Hodel

7/24/2008 11:41:00 PM

0

On Jul 24, 2008, at 13:26 PM, Rob Sanheim 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?

Rob Sanheim

7/25/2008 12:31:00 AM

0

On Thu, Jul 24, 2008 at 7:40 PM, Eric Hodel <drbrain@segment7.net> wrote:
> On Jul 24, 2008, at 13:26 PM, Rob Sanheim 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

Ryan Davis

7/25/2008 12:42:00 AM

0


On Jul 24, 2008, at 17:30 , Rob Sanheim wrote:

> for efficiency

If only I could wipe this series of words from people's brains...


Eric Hodel

7/25/2008 3:16:00 AM

0

On Jul 24, 2008, at 17:30 PM, Rob Sanheim wrote:
> On Thu, Jul 24, 2008 at 7:40 PM, Eric Hodel <drbrain@segment7.net>
> wrote:
>> On Jul 24, 2008, at 13:26 PM, Rob Sanheim 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?

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

Avdi Grimm

7/25/2008 3:20:00 AM

0

On Thu, Jul 24, 2008 at 8:41 PM, Ryan Davis <ryand-ruby@zenspider.com> 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.

;-)

--
Avdi

Home: http:...
Developer Blog: http:.../devblog/
Twitter: http://twitte...
Journal: http://avdi.livej...