Skip to content

Instantly share code, notes, and snippets.

@jbinto
Last active August 29, 2015 14:09
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 jbinto/510d205db6c9fdadaa10 to your computer and use it in GitHub Desktop.
Save jbinto/510d205db6c9fdadaa10 to your computer and use it in GitHub Desktop.
Upgrading Ruby

Upgrading Ruby

"If something is painful, do it more often."

  • 2.1.5: Nov 13 2014

OS X

I am using chruby and ruby-install.

ruby-install ruby ruby-2.1.5
chruby 2.1.5

Don't forget you're basically starting from scratch here. All of your 'global' gems will be gone now. At the very least, do:

gem install bundler

You can clean up old rubies in ~/.rubies.

Updating ruby applications

Edit the ruby version hints in the following files:

  • .ruby-version
  • Gemfile

Run bundle. Since gems belong to a specific ruby version, they all have to be re-downloaded (ugh).

Updating servers built with ansible

For servers built via jbinto/ubuntu-ansible-rails-server, edit the following files:

  • vars/defaults.yml

Run ag 2.1.3 (or the current version number) to double check.

Re-deploy your applications with hints to use 2.1.5.

You will have to restart nginx manually via ssh (TODO FIXME).

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