简体   繁体   中英

How do I set a default Ruby version using RVM?

I installed Ruby, Rails and other stuff from rubyinstaller.org on to my MacOS X Lion system. However, I am not able to override the Mac version of Ruby which is 1.8.3. How do I overrite it to the latest version? When I try to run the following command:

rvm use 1.9.3-p392

It says:

ruby-1.9.3-p392 is not installed.

Another issue is when I try to connect to MySQL using:

mysql -u root

I am getting the following error:

Can't connect to local MySQL server through socket

You can install whichever version you like, for example rvm install ruby-1.9.3-p392 . Then you can make this the default by using rvm use --default ruby-1.9.3-p392 . You must install before you can use .

See the cheat sheet for a brief overview or consult the comprehensive documentation indexed at the bottom of the page here: https://rvm.io/

Your second question regarding MySQL should be filed separately (chances are you haven't yet started the MySQL server).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM