Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Ruby on MacOS
recommended => ruby 2.3.1 minimum => ruby 2.2
We know that ruby 2.4.0 is available. We are having problems supporting ruby 2.3.1 and ruby 2.4.0 simultaneously.
We no longer support running with Apple's system ruby.
- Apple's ruby and
gembinary is always several versions behind the most recent version,
- by default, Apple's version requires
sudoto install gems,
- the ruby version on your local machine should match the ruby version in CI, including the ruby version on the Xamarin Test Cloud, and
- everyone on your team should be using the same ruby version.
You should never install a gem with sudo.
sudo is inherently dangerous. Executing a
gem install with
sudo is even more dangerous because gems can execute code at install time. This means they could erase parts of your hard drive or publish sensitive information to the internet. Installing gems with
sudo on MacOS can overwrite the pre-installed system gems which could cause internal MacOS and Xcode tools to fail.
Still not convinced? See what others have to say:
Ruby managers on MacOS
rbenv is a system for managing ruby versions.
We strongly recommend you use rbenv over rvm.
rvm is another ruby management system.
There are many users who use rvm with success, but we have had some users report problems using rvm + Calabash iOS.
We urge you to use rbenv.
Tip - gems installing slowly?
$ gem source -r http://gems.rubyonrails.org http://gems.rubyonrails.org removed from sources
Avoid installing documentation:
# Create a ~/.gemrc with the following: install: --no-document --env-shebang update: --no-document --env-shebang
Tip - Use bundler
Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
We recommend that you always use a Gemfile and bundler.