Skip gems on update

Jake's Avatar

Jake

23 May, 2011 06:07 PM

I am currently forced to work with Tomcat 5, jruby 1.5.1, warbler and hence rails ~> 2. These older versions aren't always compatible with the latest gems, but I would like to continue to be able to use the simple command "gem update." Currently, I have to follow every "gem update" with a bunch of "gem uninstall"s to keep everyone happy. I've also added a bit of a hack to warbler to remove some gems, but its just that; a hack. I'd rather that the non-compatible gems just not be installed. Thoughts on adding installation exclusions to the .gemrc file? Something of the format ...

:skip_gem_version:
- rails: ">= 3.0.0"
- arel: "> 2.0.2"
- rake: "> 0.8.7"

I also just noticed other installation issues like ...

Updating arel
System.java:-2:in `arraycopy': java.lang.ArrayIndexOutOfBoundsException
....

could be remedied by this addition.

  1. Support Staff 1 Posted by Eric Hodel on 23 May, 2011 08:37 PM

    Eric Hodel's Avatar

    If you only wish to update particular gems, why not explicitly list them?

    gem update warbler
    
  2. 2 Posted by Jake on 23 May, 2011 09:12 PM

    Jake's Avatar

    That's certainly ok when there are only a few, but I have almost 200 on my system. I like to run 'gem update' on a daily basis to keep current. Unfortunately, there are a lot of gems out there whose latest versions are no longer compatible with rails 2.

    I realize that this is more of a convenience matter, but I am surprised that it doesn't exist. Maintaining a global list of either gem versions to skip or gem versions to install, much like an individual gemspec does, seems like it would be beneficial. Particularly when an updated older version is made available, like when rails 2.3.11 was released.

  3. Support Staff 3 Posted by Nick Quaranto on 27 May, 2011 12:20 AM

    Nick Quaranto's Avatar

    This is exactly what Bundler is for. Can you use that within warbler? You can definitely use Bundler with Rails 2.x:

    http://gembundler.com/rails23.html

  4. 4 Posted by Jake on 27 May, 2011 05:46 PM

    Jake's Avatar

    Actually, I was looking for global gem management not associated with any particular application. It looks like bundler may do the trick with a Gemfile in my home dir. Initially, it was installing some odd version choices with regard to my version restrictions, but I'll figure it out.

    Thanks.

  5. Nick Quaranto closed this discussion on 12 Jun, 2011 04:51 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

30 Oct, 2014 04:34 PM
30 Oct, 2014 02:46 PM
28 Oct, 2014 09:51 AM
23 Oct, 2014 05:37 PM
21 Oct, 2014 10:47 AM