Just like the topic!
May I know what is going on?
You can look at it this way.
type ruby
The result should be
/usr/bin/ruby
This is ruby2.0 preinstalled by the system.
Brew install ruby will be installed in
/usr/local/Cellar/ruby/2.2.3/bin/ruby
Under pathruby -v ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14] @caoh ➜ ~ /usr/local/Cellar/ruby/2.2.3/bin/ruby -v ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]