Skip gems on update
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.
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Eric Hodel on 23 May, 2011 08:37 PM
If you only wish to update particular gems, why not explicitly list them?
3 Posted by Jake on 23 May, 2011 09:12 PM
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.
Support Staff 4 Posted by Nick Quaranto on 27 May, 2011 12:20 AM
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
5 Posted by Jake on 27 May, 2011 05:46 PM
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.
Nick Quaranto closed this discussion on 12 Jun, 2011 04:51 PM.