# Installing a newer Ruby version on iOS / OS X containers

**URL:** <https://discuss.circleci.com/t/installing-a-newer-ruby-version-on-ios-os-x-containers/2466>\
**Category:** Mobile\
**Tags:** ruby, how-to\
**Created:** [March 3, 2016, 9:10am UTC](https://discuss.circleci.com/t/installing-a-newer-ruby-version-on-ios-os-x-containers/2466 "2016-03-03T09:10:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexey](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/alexey/32/42_2.png) [@alexey](https://discuss.circleci.com/u/alexey)\
**Post date:** [March 3, 2016, 9:10am UTC](https://discuss.circleci.com/t/installing-a-newer-ruby-version-on-ios-os-x-containers/2466/1 "2016-03-03T09:10:58Z")

</div>

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`:

```auto
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.

---

<div class="post-metadata">

**Author:** ![blackjid](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/blackjid/32/1781_2.png) [@blackjid](https://discuss.circleci.com/u/blackjid)\
**Post date:** [March 4, 2016, 2:26pm UTC](https://discuss.circleci.com/t/installing-a-newer-ruby-version-on-ios-os-x-containers/2466/2 "2016-03-04T14:26:09Z")

</div>

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

```auto
brew install rbenv

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:33am UTC](https://discuss.circleci.com/t/installing-a-newer-ruby-version-on-ios-os-x-containers/2466/4 "2018-06-18T11:33:24Z")

</div>


