Apple releases software updates pretty regularly. It usually ships older versions of software. I need to run the latest version of ruby. I go through the following steps to upgrade it to the latest version:
- Install rbenv by checking it out using git clone https://github.com/rbenv/rbenv.git ~/.rbenv
- Append $HOME/.rbenv/bin to your path
- Refresh your shell session
- Remove the preexisting ruby versions -- yes, all of them -- from ~/.rbenv/versions, rm -Rf ~/.rbenv/versions/*
- Install the latest ruby version to ~/.rbenv/versions/
- Overwrite the files in /usr with symlinks pointing to ~/.rbenv/versions/<latest-ruby-version> -- find .rbenv/versions/<latest-ruby-version>/ -depth 1 -exec ln -sf {} /usr \;
- set the default ruby version globally to your newly rbenv-installed version. And you're now done... Have fun and make rubies
No comments:
Post a Comment