Installing Ruby For Mac



  1. Ruby For Mac
  2. Update Ruby On Mac
  3. Installing Ruby For Mac Os
  4. How Install Ruby

Which version to download?

Installing ruby for mac os

How to Install Ruby on Mac OS X with RVM. This article explains why you should avoid using the version of Ruby bundled with Mac OS X and should instead install your own version of Ruby with RVM, the Ruby Version Manager. Hands Off the System Ruby. Apple bundles the Ruby programming language with OS X. However, the main caveat for using the. Install a new Ruby with rbenv on Mac OS (and make yourself a superhero) If you're doing stuff with Ruby on a Mac, e.g. Installling Jekyll or something, by default you'll end up having to use the sudo command to do stuff, since the permission to modify the default config is not available to your user account. Mac has basically Ruby. So, you can install Rails directly, but to support various versions of Ruby, we’ll install rbenv that is ruby version manager. Execute the command below to install rbenv.

If you don’t know what version to install and you’re getting started with Ruby, we recommend that you use the Ruby+Devkit 2.7.X (x64) installer.It provides the biggest number of compatible gems and installs the MSYS2 Devkit alongside Ruby, so gems with C-extensions can be compiled immediately.The 32 bit (x86) version is recommended only if custom 32 bit native DLLs or COM objects have to be used.

How to update?

Ruby can be updated to the latest patch version (e.g. from 2.6.1 to 2.6.4) by running the new installer version.Installed gems are not overwritten and will work with the new version without re-installation.It’s sufficient to use the RubyInstaller without Devkit for these update installations.The Devkit can be updated separately using the ridk install command.

If the new Ruby version is from a different stable branch, then please use a new target directory for installation.That is to say, a previous RubyInstaller-2.6.x installation should not be updated by installing RubyInstaller-2.7.x into the same directory.This is because gems with C extensions are not compatible between ruby-2.6 and 2.7.Find out more in the FAQ.

RubyInstaller-head

RubyInstaller-head is a daily-updated version of the Ruby development branch.It can be used for continuous integration tests (CI) on your gems or applications, so you’re prepared for upcoming changes to the Ruby core.Builds are available on stable download URIs in the github release section.They can be easily integrated into Appveyor.

With Development Kit?

RubyInstaller uses the MSYS2 toolchain as its development kit.It is bundled into the Ruby+Devkit installer version as a selectable component, so that no additional downloads/installs are required.It’s possible to share one Devkit among multiple versions of Ruby.

MSYS2 is required in order to build native C/C++ extensions for Ruby and is necessary for Ruby on Rails.Moreover it allows the download and usage of hundreds of Open Source libraries which Ruby gems often depend on.

The MSYS2 development environment can be activated in a running cmd or powershell console by ridk enable.This adds commands like make, gcc, pacman or sh to the search path.See more in the Wiki.

Speed and Convenience

RubyInstaller is compiled with the latest GCC at the release date.The installed Ruby is a native Windows application but combines this with the rich UNIX toolset of MSYS2 and the large repository of MINGW libraries.

Ruby For Mac

Read more about RubyInstaller and its alternatives here.

Documentation

The Ruby core- and standard library documentation are included as part of the installation.We also recommend the online documentation, or the HTML version downloadable from ruby-doc.org.

Support

Enjoy! Happy Ruby-coding! And let us know what you think, or if you have any issues, at our helpful and friendlyRubyInstaller Google Group.

Install Command Line Tools

To install the command line tools to compile native extensions, open a terminal and run:

Install Ruby

Jekyll requires Ruby v2.5.0 or higher.macOS Catalina 10.15 ships with Ruby 2.6.3. Check your Ruby version using ruby -v.

If you’re running a previous version of macOS, you’ll have to install a newer version of Ruby.

With Homebrew

To run the latest Ruby version you need to install it through Homebrew.

Add the brew ruby path to your shell configuration:

Relaunch your terminal and check your Ruby setup:

You’re now running the current stable version of Ruby!

With rbenv

People often use rbenv to manage multipleRuby versions. This is very useful when you need to be able to run a given Ruby version on a project.

Restart your terminal to apply your changes.Next, you can install the Ruby version you want. Let’s install the latest stable version:

That’s it! Head over to rbenv command references to learn how to use different versions of Ruby in your projects.

Install Jekyll

After installing Ruby, install Jekyll and Bundler.

Local Install

Install the bundler and jekyll gems:

Get your Ruby version:

Append your path file with the following, replacing the X.X with the first two digits of your Ruby version:

Check that GEM PATHS: points to your home directory:

Every time you update Ruby to a version in which the first two digits change, update your path to match.

Global Install

Ruby

We recommend not installing Ruby gems globally to avoid file permissions problems and using sudo.

On Mojave (10.14)

Because of SIP Protections in Mojave, run:

Before Mojave (<10.14)

Update Ruby On Mac

Run:

Installing Ruby For Mac Os

Troubleshooting

How Install Ruby

See Troubleshooting or ask for help on our forum.





Comments are closed.