Dealing with Ruby versions - chruby
Every time I sit down to code, it seems like a new Ruby version is available.
When I set up my current machine, I found
rvm had fallen out of fashion in favour of something called
Install new ruby
chruby from Homebrew, if not already done.
brew install chruby --HEAD brew install ruby-install --HEAD
Go to https://www.ruby-lang.org/en/ and find out the newest version. At the time of writing, that is
ruby-install ruby 2.2.2
Remove old Rubies
Remove older Ruby versions:
ls -la ~/.rubies rm -rf ~/.rubies/ruby-2.1.5 rm -rf ~/.rubies/ruby-2.2.1
Restart your shell, so
chruby can see other versions.
.common_env in my case) to execute the correct
.powconfig if using Pow.
Bundler will not be installed, and rubygems may be out of date:
$ bundle zsh: command not found: bundle $ gem --version 2.4.5
Upgrade rubygems, and install bundler.
gem update --system gem install bundler
chruby doesn't have a concept of "gemsets". This is not like Python's
virtualenv where each project is isolated from one another.
Every project will need to be re-bundled. Gems are installed locally, for the current