What are the benefits of RVM for Linux?

Please understand that I am not trying to use bash RVM. I just wanted to understand why it is so popular in the Ruby community.

There seem to be two main reasons for using RVM - for managing / switching between different versions of Ruby and for managing a specific gemset for each project. However, there seem to be much cleaner ways to achieve the same thing on Linux:

  • I can install different versions of ruby ​​from repositories through a regular package manager or build from the source and install as a package. I can switch between versions using update-alternatives (at least on Debian, Ubuntu, Fedora).
  • I can use the Bundler to manage gem sets for different projects, as outlined in this blog post .

Given the above, I am confused about why I would like to use RVM to control Ruby versions and gems. The idea of ​​using a bash script to install software on my system outside of the package manager seems very hacky, the feeling is reinforced by this blog post .

Not being a Mac user, I fully guess here, but I thought OS X was very popular in the Ruby community. If OS X does not have a system such as update alternatives for switching ruby ​​versions, RVM may be the best solution, and this idea has been ported to linux too. As I said, this is just an assumption.

So why is RVM so popular, and why should I prefer it over the regular package manager + Bundler on Debian or Ubuntu?

+4
source share
2 answers

If you need to manage many projects with different versions of Ruby and special Rails, such as me (I have 3 projects for management, which use Rails 2.3.5, Rails 3.0.5 and Rails 3.1 rc1), RVM is an urgent solution. As you know, Rails 2.3.x does not have socket support and uses old gems, so version control is a way to facilitate development. I hope I helped you.

+3
source
  • RVM is transferred
  • update-alternatives works all over the world, RVM works in the context of the shell / script - I assume that it changes the env paths. Now imagine that on one server there are two applications: one 1.8.7 and another 1.9.2
  • Using Ruby EE requires manual installation - with RVM, it is a matter of one command to install it.
  • I had too many problems with mixed gem dirs with 1,8,7 or 1,9.2 only in stone in Debian.
  • Easy backup - just copy .rvm dir.
  • Consistent clustering (same platform) - just share one .rvm dir.
+3
source

All Articles