# List gem updates without installing?

**URL:** <https://www.ruby-forum.com/t/list-gem-updates-without-installing/97649>\
**Category:** Ruby\
**Created:** [July 9, 2006, 3:42am UTC](https://www.ruby-forum.com/t/list-gem-updates-without-installing/97649 "2006-07-09T03:42:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![masonbrown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b38774/32.png) [@masonbrown](https://www.ruby-forum.com/u/masonbrown)\
**Post date:** [July 9, 2006, 3:42am UTC](https://www.ruby-forum.com/t/list-gem-updates-without-installing/97649/1 "2006-07-09T03:42:29Z")

</div>

Is there a way to list, but not install, updated gems? I know that ‘gem  
update’ will automatically update any gems to newer versions, but I’d  
like to see what it’s planning to do before actually doing the updates.

Thanks!

-Mason

---

<div class="post-metadata">

**Author:** ![masonbrown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b38774/32.png) [@masonbrown](https://www.ruby-forum.com/u/masonbrown)\
**Post date:** [July 10, 2006, 1:31am UTC](https://www.ruby-forum.com/t/list-gem-updates-without-installing/97649/2 "2006-07-10T01:31:14Z")

</div>

Andrew H. wrote:

> Mason B. wrote:
> 
> > Is there a way to list, but not install, updated gems?
> 
> All I could think of was querying the local gems, querying the remote  
> gems, then comparing the version numbers on the remote gems also in the  
> local repository. I’ve thrown a Ruby script together to do it, though it  
> lacks any elegance and has only had minimal testing:

More generally, is there a nice way to add customized behavior to one’s  
install of rubygems? Basically, plugins, such as could add to or alter  
the default behavior?

I’ve poked around a bit, but not settled on a pleasing solution.

–  
James B.

“Take eloquence and wring its neck.”

- Paul Verlaine

---

<div class="post-metadata">

**Author:** ![masonbrown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b38774/32.png) [@masonbrown](https://www.ruby-forum.com/u/masonbrown)\
**Post date:** [July 10, 2006, 4:47am UTC](https://www.ruby-forum.com/t/list-gem-updates-without-installing/97649/3 "2006-07-10T04:47:18Z")

</div>

Andrew H. wrote:

> Mason B. wrote:
> 
> > Is there a way to list, but not install, updated gems?
> 
> All I could think of was querying the local gems, querying the remote  
> gems, then comparing the version numbers on the remote gems also in the  
> local repository. I’ve thrown a Ruby script together to do it, though it  
> lacks any elegance and has only had minimal testing:
> 
> [http://pond.org.uk/misc/gem-would-update.rb](http://pond.org.uk/misc/gem-would-update.rb)
> 
> Is there a better way?

That’s exactly the type of thing I was looking for. Thanks for the  
quick and awesome response.

Maybe the gem project would consider including this kind of  
functionality as a future feature? They obviously already maintain  
local and remote versions and compare them to determine if they need to  
be upgraded.

Again, thanks!

-Mason

---

<div class="post-metadata">

**Author:** ![masonbrown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b38774/32.png) [@masonbrown](https://www.ruby-forum.com/u/masonbrown)\
**Post date:** [July 10, 2006, 12:56am UTC](https://www.ruby-forum.com/t/list-gem-updates-without-installing/97649/4 "2006-07-10T00:56:52Z")

</div>

Mason B. wrote:

> Is there a way to list, but not install, updated gems?

All I could think of was querying the local gems, querying the remote  
gems, then comparing the version numbers on the remote gems also in the  
local repository. I’ve thrown a Ruby script together to do it, though it  
lacks any elegance and has only had minimal testing:

[http://pond.org.uk/misc/gem-would-update.rb](http://pond.org.uk/misc/gem-would-update.rb)

Is there a better way?

---

<div class="post-metadata">

**Author:** ![masonbrown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b38774/32.png) [@masonbrown](https://www.ruby-forum.com/u/masonbrown)\
**Post date:** [July 15, 2006, 6:16pm UTC](https://www.ruby-forum.com/t/list-gem-updates-without-installing/97649/5 "2006-07-15T18:16:56Z")

</div>

What about using “gem update”, it updates all the installed gems … at  
least for me it does.

---

<div class="post-metadata">

**Author:** ![masonbrown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b38774/32.png) [@masonbrown](https://www.ruby-forum.com/u/masonbrown)\
**Post date:** [July 15, 2006, 6:17pm UTC](https://www.ruby-forum.com/t/list-gem-updates-without-installing/97649/6 "2006-07-15T18:17:03Z")

</div>

What about using “gem update”, it updates all the installed gems … at  
least for me it does.

---

<div class="post-metadata">

**Author:** ![masonbrown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b38774/32.png) [@masonbrown](https://www.ruby-forum.com/u/masonbrown)\
**Post date:** [July 15, 2006, 6:23pm UTC](https://www.ruby-forum.com/t/list-gem-updates-without-installing/97649/7 "2006-07-15T18:23:03Z")

</div>

bbiker wrote:

> What about using “gem update”, it updates all the installed gems … at  
> least for me it does.

Yes, but the OP wanted to see what gem _would_ update, without actually  
doing the update. It’s a cautious (and IMHO wise) approach to upgrading  
software rather than just updating and hoping nothing breaks.
