Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adeguntoro/ddff8a1fc7f236f597d9df0e86e89d72 to your computer and use it in GitHub Desktop.
Save adeguntoro/ddff8a1fc7f236f597d9df0e86e89d72 to your computer and use it in GitHub Desktop.
Updating Ruby with rvm or rbenv on a Mac

RBENV

  • rbenv install -l
  • rbenv install 2.4.3
  • rbenv local 2.4.3
  • gem bundler install
  • bundle install

RVM

Install RVM if Necessary

  1. Install with curl \curl -sSL https://get.rvm.io | bash -s stable
  2. Source the RVM source /Users/wrburgess/.rvm/scripts/rvm

Upgrading Ruby with RVM

  1. Update RVM with rvm get stable --ruby
  2. Tell RVM to install new ruby with rvm install [version_number]
  3. Change the ruby version in the app's .ruby-version file
  4. Change the ruby version in the app's Gemfile
  5. Rebuild your gems with bundle install
  6. Reload your terminal with source ~/.bash_profile
  7. Confirm ruby version changed with ruby -v

CI Environment

  1. Ignore unless you manage this aspect of the project
  2. Change the ruby version in Codeship/Travis

Error Messages

If you receive the message:

You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode.

run sudo gcc, hit Enter, type q, type agree, type Enter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment