How to exclude a gem from "gem update"

Hi,

Is there a way to tell rubygems to update all gems except some?
Something to put in ~/.gemrc?

Fernando P. wrote:

Hi,

Is there a way to tell rubygems to update all gems except some?
Something to put in ~/.gemrc?

I’m not sure, but how useful would this be? Updating a gem doesn’t
remove older versions, so it normally won’t break anything.

Best,
–Â
Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Sent from my iPhone

On Jul 23, 8:17 pm, Fernando P. [email protected] wrote:

Hi,

Is there a way to tell rubygems to update all gems except some?
Something to put in ~/.gemrc?

why do you care? If you’ve got some code that doesn’t work with the
latest version of a gem you can make rubygems always load the exact
version you need.

Fred

Hi guys,

You’re not directly answering my question (I consider the answer as no
it’s not possible), and since you’re asking “why?”:

I run a FreeBSD server and I wanted to install Nginx with option to
support passenger and Ruby 1.9 through FreeBSD ports’ system.

The problem is that Nginx requires the ruby-rake to be installed through
port as well. This means that if I run “gem update”, rake will be
updated and its corresponding freebsd port will still be thinking to see
the old version, so when I update my ports, the port manager will be
confused because it sees a rake binary which is not the expected one
(freebsd port manager does a checksum on binaries).

Therefore I’d like to be able to update all gems using “gem update”, and
update the rake gem using freebsd ports.

But if you have any workarounds to offer I’ll gladly consider them :slight_smile:

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