Install a particular version of a gem?

Skip to first unread message

Tim Uckun

Nov 4, 2009, 8:29:27 PM11/4/09
I was looking in the documentation and I can't see a way to install a
particular version of a gem. Is there a way to specify the version of
a gem?

Tim Uckun

Nov 4, 2009, 8:55:28 PM11/4/09
Never mind....

Found the sample.

Igal Koshevoy

Nov 4, 2009, 9:07:49 PM11/4/09
There's currently no way to install a specific version of a Ruby gem
with AutomateIt.

However, I did write most of the code for this and will try to include
it in the next release that I'm putting together.

The invocations will look like:
package_manager.install "rails", :with => :gem, :version => "2.3.4"


Tim Uckun

Nov 4, 2009, 9:26:38 PM11/4/09
> The invocations will look like:
>    package_manager.install "rails", :with => :gem, :version => "2.3.4"

Thanks I think this feature is important because a lot of times
updates to gems break existing apps so I would like to control which
versions are on which machines.

If you are open to suggestions I would suggest that you create a
gem_manager instead of overloading package_manager.

Maybe even something like this....

install_gems [ 'sequel', {:rails => '2.3.4'}, { :rcov => :latest}]

if you don't specify a version then it would install the latest but
not upgrade it to the latest. If you say "latest" it would upgrade it
if there is a later version. if it's tagged then it only installs that

BTW I am following your suggestion from a couple of days ago and
things are going pretty good. Now comes the hard part of figuring out
what I did and how can write a recipe to duplicate it.
Reply all
Reply to author
0 new messages