There has been a multitude of posts about this topic. In the light of this, I will try to keep this post neutral and objective. And then I will include personal impressions and experiences. I do not want to add to any spin or angry discussions.
Disclaimer: I am a Debian user. I like apt/dpgk, I try to adhere to the FHS, I do not exactly love system-intrusive libraries or third-party package managers. I am biased. You have been warned.
What’s it all about?
Yesterday, I decided to give rbenv a chance, after hearing friends talking about it. Together with all the changes covered in my First Post, I also decided to install it and try it.
Up to now, I have been a very happy rvm user, and I am still using it at work and on most of my computers. Just my laptop received the upgrade (yet).
An old friend: rvm
I want to stress the point: I am using rvm in a very complex environment, using a multitude of ruby versions as well as gemsets (especially when upgrading rails, you do not want to have half of the projects failing because of a changed gem version). What can I say? It’s working.
There is just a small but: updating rubies makes this even worse. Having rvm use 1.9.3@somegemset
in an .rvmrc file in each project directory can pretty brutally hose your installation (which is no big thing, drop the gemsets and reinstall all of it). But it can confuse for a moment.
Also, having an indicator is nice. I use rvm-prompt to change part of my zsh prompt to show the current rvm version and gemset and I love that, too.
And anyways, if push comes to shove, I use rvm implode
and reinstall the whole thing.
The new contender: rbenv
With rbenv, I do like the idea of shims and the whole thing only “polluting” your path instead of installing really huge functions in your environment. It’s actually neat: you have wrapper scripts that pick up environment and location information, and do the right thing. No cd function, no rvm function, very little preloading, no extra hooks. It’s not better, just from a sysadmin standpoint, it’s neater (YMMV, of course).
Now, with rbenv, I first installed rbenv-build and rbenv-gemsets. Obviously, I need this functionality – at least, I felt like it. And then I used it immediately, and was already a bit surprised that there is no mapping from ‘1.9.3’ to the most current patchlevel known (as in rvm). Still, not a problem.
Anyways, the build recipes I tried worked out of the box and left me with a system I can just use - and also integration of Command-T is even easier than with rvm. So far, so good …
Conclusion
I have no real need to switch from rvm to rbenv in my development environments. Sure, it’s neat - but rvm has matured and has a lot of nifty little commands and helpers that make my life easier. Including upgrading of ruby versions et al.
Still, for servers I would definitely consider using rbenv. The integration is less tight with shell functions and can work on a very easily understandable low level.
But which is the right tool for you? Just try and decide for yourself. Maybe this short post or some of the linked ones help.