Ruby Environment: An Excellent RVM AlternativeThere are two commonly used tools formanaging multiple versions of Ruby installedon one computer:● Ruby Version Manager (RVM)● Ruby Environment (rbenv)
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
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.
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.
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. – Its easier to maintain single-purpose projects
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 wont 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.
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
A particular slide catching your eye?
Clipping is a handy way to collect important slides you want to go back to later.