Search code examples
rubymacosrubygemshomebrewrbenv

Using Homebrew vs a ruby version manager on OS X?


I have a few questions about using Ruby on an OS X 10.11 El Capitan:

  1. Do you think it is ok to modify Apple's built-in Ruby installation (as in installing or upgrading Gems), or should I install a separate ruby environment? (I had been modifying the built in one previously, but once I upgraded to El Capitan Apple undid all of my changes. I never had any problems with it before the upgrade, even when I updated the Gems that Apple included in to more recent versions. Yet I am still worried.)

I'm considering leaving Apple's built in Ruby alone and installing a separate one, leading me to my second question:

  1. Everywhere I read on the internet, people recommend using a Ruby version manager (rbenv, RVM, and the like) to install a separate Ruby environment. I feel like it would be easier, cleaner, and more straightforward to simply use homebrew, since I use it already, to install a ruby to /usr/local. What would be some problems with using homebrew instead of a dedicated Ruby version manager? What are the advantages of using a version manager over homebrew?

Solution

  • Don't mess w/your system Ruby, your system needs to be stable and it's not necessary.

    Homebrew isn't made to manage multiple versions of software. RVM (and others) and made to do exactly that. I currently have 6 rubies installed. I'd hate to have to manage that manually. RVM (or friends) is the way to go if you are installing Ruby on your host. People often go to the next level and use Vagrant instances to further isolate their development environment.