RVM and rbenv are tools for managing multiple Ruby versions on a single computer. RVM has more features like gemsets but also makes more changes to your system. Rbenv only manages Ruby versions and follows the Unix philosophy of single-purpose tools. Rbenv may be preferable if you don't need gemsets and value simplicity, while RVM remains a good choice for its advanced features and gemset support.
1. Ruby Environment: An Excellent
RVM Alternative
There are two commonly used tools for
managing multiple versions of Ruby installed
on one computer:
● Ruby Version Manager (RVM)
● Ruby Environment (rbenv)
2. RVM: More Features
● RVM is by far the most popular and is
somewhat easier to get started with, since
nearly all the tutorials are written for it.
● It has many powerful, advanced features.
– Gemsets
– Install/uninstall Rubies
3. RVM Does Many Things
● RVM has many features, some of which
makes some significant changes to your
shell.
● Some of those changes alarmed a few
members of the Ruby community,
particularly the overriding of the 'cd'
command. This was one of the reasons
why rbenv was created.
5. Rbenv: Do One Thing; Do it Well
● Rbenv only manages multiple rubies
installed on your machine.
● You may either install rubies manually or
use a separate tool called ruby-build.
6. Which Should I Use?
● As long as RVM is maintained and you
need Gemsets, RVM is probably the better
choice.
● If you prefer the Unix philosophy that each
tool should do one thing and do it well, you
will probably prefer rbenv.
● Rbenv may outlive RVM in the long run.
– It's easier to maintain single-purpose
projects
7. Additional Considerations
● A quirk of rbenv is that if you install a gem
that includes 'binaries' (or any generally
available command line scripts), you need
to run `rbenv rehash`, or your newly
installed gems/command line scripts won't
work.
– This can be annoying.
● Rbenv does not support Gemsets
(although you can use rbenv-gemset to get
some basic gemset-like features).
– If you need Gemsets, RVM is best.
8. Tell Me More
● Github rbenv home:
https://github.com/sstephenson/rbenv
● RVM: https://rvm.io/
● A nice intro to rbenv:
http://www.rubyinside.com/rbenv-a-simple-new