Installing a newer Ruby version on iOS / OS X containers

ruby
how-to

#1

The default Ruby version installed in the OS X containers is 2.0.0p648. Sometimes you would want to use a newer Ruby in your build—in this case you can get the newest Ruby available through Homebrew installed with the following content of your circle.yml:

machine:
  pre:
    - brew install ruby ; brew link --overwrite ruby

After choosing a different Ruby version please make sure to do a rebuild without cache so that all the gems are rebuilt with the new version of the language.


#2

If you want an specific ruby version maybe you can install rbenv + ruby-build instead…

brew install rbenv

#4