I'm not a Ruby user per se, but have it on my system because I use it (so far) for just two things (that I'm aware of):
- Homebrew, and
- the Travis CI command line tools.
I'd like to keep both of those current, but I'm confused right off the block by what version of Ruby I'm even using.
When I ask Homebrew I get:
$ brew --config
#...
Homebrew Ruby: 2.0.0-p648
#...
Ruby: /usr/local/bin/ruby => /usr/local/Cellar/ruby/2.4.1_1/bin/ruby
#...
but when I ask my system I get:
$ which -a ruby
/usr/local/bin/ruby
/usr/bin/ruby
$ /usr/local/bin/ruby --version
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
$ /usr/bin/ruby --version
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
$ ruby --version
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
Why does the "system" Ruby that Homebrew sees not agree with the version that my system uses at the prompt? How do I keep all this up-to-date? Specifically, how do I keep up-to-date
- the version of Ruby used by Homebrew
- the version used at the prompt, and
- my Travis CI tools (and the version of Ruby it uses)?