
lera.jpg)
Using more than one at the same time may cause problems. To run different Ruby versions on your Mac, consider one of the following: chruby, rbenv, and RVM. The Rails framework also require a relatively newer version of Ruby. The Ruby maintainers drop support for older Ruby versions. You get security fixes and you stay on a supported version. It is important to upgrade the Ruby version you use.

You can use Ruby 2.3 for one application and Ruby 2.4 for another. These are installers and version managers that make it easier to install and run multiple Ruby versions. If you’re developing multiple Ruby applications, you should consider one of the tools below. If you’re using Ruby to run a few scripts then using the Homebrew version is enough. export PATH='/usr/local/bin:/usr/local/sbin:$PATH' Add /usr/local/bin to the start of your PATH so it becomes the default Ruby.Īdd this to ~/.profile or ~/.bash_profile. This will install the latest Ruby version on Homebrew (which is 2.5.0 at the time of this writing) on /usr/local/bin/ruby. Once Homebrew is installed, you can use it to install Ruby. xcode-select -installĪlternatively, you can install the full Xcode from the App Store or the smaller Command Line Tools for Xcode from. You can install the Command Line Tools from the command line. Most Homebrew packages require a compiler. Mkdir homebrew & curl -L | tar xz -strip 1 -C homebrew If you don’t like to run a script from a remote site, you can run this instead cd /usr/local To install Homebrew, run /usr/bin/ruby -e '$(curl -fsSL )' You can also use it to install a tool that will install Ruby. On a Mac, you can use Homebrew to install newer versions of Ruby. Using a package management system makes your life easier when installing any software. However, the pre-installed version is a few versions behind so we’ll look into the other ways to install Ruby. First of all, Ruby is already pre-installed on your Mac. This should work on recent MacOS versions – El Capitan, Sierra, and High Sierra. This is a post on installing Ruby on a Mac.
