Is there a summary of the differences between RVM and PIK?

184 views
Skip to first unread message

Chuck van der Linden

unread,
Oct 11, 2011, 4:20:18 PM10/11/11
to pik help and suggestions
I'm just getting started with this idea of version managers for Ruby
in the process of doing some work to update watir scripts from an
older version to 2.0x As the older version won't work with newer
Ruby, it's looking like RVM (on the mac side) and PIK (for my windows
boxen) are going to be essential tools for me.

Is there something that summarizes the differences between the two
tools?

For example, I'm a bit confused by how Gems are handled. It seems
that RVM uses this gemset concept where you setup labeled collections
of gems of specific versions etc and then can just swap the entire
sets in/out at will. (someone correct me if I've got that wrong)
Where it appears with PIK that each Ruby version get's it's own set of
gems, and basically switching your Ruby version switches your gems as
well (is that right?) In the pik case it seems like I can use
PIK GEM xxxx to run a gem command (which could be install?) against
all my Ruby versions at once

Or if I have a good set of gems on one ruby version and just want to
copy it to another, I can use
PIK GEMSYNC

Are there other major differences I need to be aware of?

Also as a suggestion, the usage page in the wiki is good, but without
really understanding the tool the way the author does, it's not always
clear when/why I would use a given command, such as for example 'add'
what is that letting me do and why would I use it as opposed to say
'install' ?

Nick Klauer

unread,
Oct 11, 2011, 11:02:58 PM10/11/11
to discu...@googlegroups.com
I would recommend reading up on RVM a bit more.  Basically, RVM works in a Bash prompt to make sure that when you type:
rake test
 You're doing it for whichever installation you're configured to run with at that time.  So if you are using 1.8.7, "rake test" runs the 1.8.7's Rake.  If you switch (rvm use 1.9.2), and run "rake test", you run 1.9.2's Rake.  The whole purpose is to simplify managing Ruby installations, as there are quite a few to be competing with nowadays (JRuby, Rubinius, 1.8.7, 1.9.2, 1.9.3-RC1, MagLev, etc.).

Gemsets are just one feature in RVM's toolbox to make working with projects easier.  I would say that Bundler can be used in place of this if you want to manage a set of gems for a specific project, and with your need to run both Windows and *Nix, I'd recommend that (as that's what I do), as Pik doesn't provide an equivalent feature.



The tl;dr of this is that Pik and RVM are there if you plan on using multiple installations of Ruby and want a quick way of switching between them without having to remember a complicated command for each install you want to run.  You just switch the install, and run the same command ("rake test", for instance) and see how your gem/project/whatever works on that install versus another.  However, if you only plan on using 1.9.2 on Windows and 1.8.7 on Linux (for example) and don't plan on running against other installs (such as a different patch-level of 1.8.7) you probably won't get much use out of either tool (and can probably save yourself some headache working with a tool that isn't simplifying your workday).

Chuck van der Linden

unread,
Oct 13, 2011, 3:34:15 PM10/13/11
to pik help and suggestions
Thanks for the reply, Yes I do expect to be hopping back and forth a
bit, so am figuring that pik is worth using for me.

On Oct 11, 8:02 pm, Nick Klauer <kla...@gmail.com> wrote:
> I would recommend reading up on RVM a bit more.  Basically, RVM works in a
> Bash prompt to make sure that when you type:
>
> rake test
>
>  You're doing it for whichever installation you're configured to run with at
> that time.  So if you are using 1.8.7, "rake test" runs the 1.8.7's Rake.
>  If you switch (rvm use 1.9.2), and run "rake test", you run 1.9.2's Rake.
>  The whole purpose is to simplify managing Ruby installations, as there are
> quite a few to be competing with nowadays (JRuby, Rubinius, 1.8.7, 1.9.2,
> 1.9.3-RC1, MagLev, etc.).
>
> Gemsets are just one feature in RVM's toolbox to make working with projects
> easier.  I would say that Bundler <http://gembundler.com/> can be used in
Reply all
Reply to author
Forward
0 new messages