installing multiple ruby gems of specific versions at the same time
Hi all, I'm new to ruby gems and ruby and the such. I was just wondering, if I wanted to install multiple ruby gems at the same time, and I wanted to specify the version, how would I go about doing such a thing in unix? Right now, I have something like this
In a file called gemtest, I have
gem install --version '= 0.43' --ignore-dependencies
linecache
gem install --version '= 0.1.7' --ignore-dependencies linkedin
When i type this into unix: cat gemtest | xargs sudo
ERROR: Could not find a valid gem 'linecache' (= 0.1.7) in any
repository
ERROR: Could not find a valid gem 'gem' (= 0.1.7) in any
repository
ERROR: Could not find a valid gem 'install' (= 0.1.7) in any
repository
Successfully installed linkedin-0.1.7
1 gem installed
... (installs rdoc and stuff)
My question is, why doesn't it successfully install both? And why does it put the version specified at the end of the file for all other gems in the file (this example has 2, the one I'm trying to work with is 50 or so).
I guess my question is, can someone educate me as to the syntax
of gem install? Haha :) thanks
(
Support Staff 2 Posted by Nick Quaranto on 21 Apr, 2011 01:22 PM
You should be able to do
gem install rails -v 3.0.0. The options/flags should work in any combination. You probably need the dependencies as well.Another thing you could try are RVM gemsets:
http://beginrescueend.com/gemsets/