84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
如题!
请教是怎么回事?
小伙看你根骨奇佳,潜力无限,来学PHP伐。
You can look at it like this
type ruby
The result should be
/usr/bin/ruby
This is ruby2.0 pre-installed on the system
Use brew install ruby and it will be installed in the /usr/local/Cellar/ruby/2.2.3/bin/rubypath
/usr/local/Cellar/ruby/2.2.3/bin/ruby
ruby -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]
It is best to use RVM to install Ruby on mac, which is convenient for management and does not require sudo permissions
Just configure the environment variables under your bash_profile. .
But still use rvm to install, otherwise you may encounter strange problems: the original system version will appear inexplicably. .
It’s a matter of path, just change your bash path.
You first use brew info ruby命令看一下有几个版本然后用brew switch ruby 版本号 就可以切换到指定版本比如brew switch ruby 2.2.3 to switch to version 2.2.3In fact, brew just redoes the soft link
brew info ruby
brew switch ruby
brew switch ruby 2.2.3
You can look at it like this
The result should be
This is ruby2.0 pre-installed on the system
Use brew install ruby and it will be installed in the
/usr/local/Cellar/ruby/2.2.3/bin/ruby
pathIt is best to use RVM to install Ruby on mac, which is convenient for management and does not require sudo permissions
Just configure the environment variables under your bash_profile. .
But still use rvm to install, otherwise you may encounter strange problems: the original system version will appear inexplicably. .
It’s a matter of path, just change your bash path.
You first use
brew info ruby
命令看一下有几个版本然后用
brew switch ruby
版本号 就可以切换到指定版本比如
brew switch ruby 2.2.3
to switch to version 2.2.3
In fact, brew just redoes the soft link