[英]Unable to install Ruby 1.9.3
I tried to install Ruby 1.9.3 using RVM.我尝试使用 RVM 安装 Ruby 1.9.3。 It seems that it installed without error, but the version of Ruby still remains 1.8.7.貌似安装没有报错,但是Ruby的版本还是1.8.7。
Has anyone else encountered this situation?还有其他人遇到过这种情况吗?
AlexHo@server:~$ rvm install 1.9.3
Already installed ruby-1.9.3-p125.
To reinstall use:
rvm reinstall 1.9.3
AlexHo@server:~$ rvm reinstall 1.9.3
Removing /Users/AlexHo/.rvm/src/ruby-1.9.3-p125...
Removing /Users/AlexHo/.rvm/rubies/ruby-1.9.3-p125...
Removing ruby-1.9.3-p125 aliases...
Removing ruby-1.9.3-p125 wrappers...
Removing ruby-1.9.3-p125 environments...
Removing ruby-1.9.3-p125 binaries...
Fetching yaml-0.1.4.tar.gz to /Users/AlexHo/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/AlexHo/.rvm/src
Configuring yaml in /Users/AlexHo/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/AlexHo/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/AlexHo/.rvm/usr
Installing Ruby from source to: /Users/AlexHo/.rvm/rubies/ruby-1.9.3-p125, this may take a while depending on your cpu(s)...
ruby-1.9.3-p125 - #fetching
ruby-1.9.3-p125 - #extracting ruby-1.9.3-p125 to /Users/AlexHo/.rvm/src/ruby-1.9.3- p125
ruby-1.9.3-p125 - #extracted to /Users/AlexHo/.rvm/src/ruby-1.9.3-p125
ruby-1.9.3-p125 - #configuring
ruby-1.9.3-p125 - #compiling
ruby-1.9.3-p125 - #installing
Removing old Rubygems files...
Installing rubygems-1.8.17 for ruby-1.9.3-p125 ...
Installation of rubygems completed successfully.
ruby-1.9.3-p125 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.3-p125 - #importing default gemsets (/Users/AlexHo/.rvm/gemsets/)
Install of ruby-1.9.3-p125 - #complete
AlexHo@server:~$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
You have to specify which version of Ruby you want to use.您必须指定要使用哪个版本的 Ruby。 Try the following:尝试以下操作:
rvm use 1.9.3 --default
I think you are missing this command:我认为您缺少此命令:
$ rvm use 1.9.3
You can see which versions of ruby are installed by using:您可以使用以下命令查看安装了哪些版本的 ruby:
rvm list
You will also see which version has been set to default.您还将看到哪个版本已设置为默认版本。
The default version can be set with:默认版本可以设置为:
rvm use 1.9.3 --default
If you are running Ruby On Rails you might also check the.rvmrc file in your working directory which can hold a string like:如果您正在运行 Ruby On Rails,您还可以检查工作目录中的 .rvmrc 文件,它可以包含如下字符串:
rvm ruby-1.9.3@gemset
to define which Ruby version should be used for the current directory.定义当前目录应使用哪个 Ruby 版本。
Hope this helps!希望这可以帮助!
Auto selecting rubies is not yet implemented, open a ticket at https://github.com/wayneeseguin/rvm/issues and I will add it.自动选择rubies还没有实现,开工单https://github.com/wayneeseguin/rvm/issues我来补充。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.