我已经安装了 RVM
没有任何问题。但是当我尝试安装 ruby 1.9.3
时,它返回一个错误:
ruby-1.9.3-p392 - #configure
ruby-1.9.3-p392 - #download
ruby-1.9.3-p392 - #validate archive
ruby-1.9.3-p392 - #extract
ruby-1.9.3-p392 - #validate binary
ruby-1.9.3-p392 - #setup
/usr/local/rvm/scripts/functions/utility: line 708: /usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby: No such file or directory
/usr/local/rvm/scripts/functions/utility: line 713: /usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby: No such file or directory
ln: target `/gems/' is not a directory: No such file or directory
Saving wrappers to '/usr/local/rvm/wrappers/ruby-1.9.3-p392'........
ruby-1.9.3-p392 - #importing default gemsets, this may take time...............................
Making gemset ruby-1.9.3-p392 pristine.....
Making gemset ruby-1.9.3-p392@global pristine.....
brian@vs3594:~$ rvm use --default 1.9.3
Using /usr/local/rvm/gems/ruby-1.9.3-p392
brian@vs3594:~$ rvm use 1.9.3
Using /usr/local/rvm/gems/ruby-1.9.3-p392
brian@vs3594:~$ ruby -v
-bash: /usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby: No such file or directory
brian@vs3594:~$ rvm use system
Now using system ruby.
brian@vs3594:~$ ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]
我迷路了。感谢您的帮助!
使用 Ubuntu 12.04 LTS 32 位全新安装
最佳答案
/usr/local/rvm/scripts/functions/utility
您使用通用的多用户安装方式安装了 RVM,除非您支持共享主机,否则不推荐这样做。对于大多数用途,您应该使用单用户安装,它将 RVM 以及与之关联的所有 Rubyies 和 gem 放在 ~/.rvm 中。通过在/usr/local 中安装,修改或安装新 Ruby 所需的每个操作都将涉及使用升级的权限。
安装 RVM 时,阅读、理解并遵循 installation directions on the RVM site 很重要,而不是您在其他网站上找到的说明,这些说明可能与您的具体情况相关,也可能不相关,或者可能已经过时。在 RVM's installation page ,作者特别指出:
External tutorials
Note that that any outside tutorials are NOT supported whether they work or not. Tutorials are great, however we have spent massive amounts of man hours debugging the installation process. Please use the install process(es) from this site only, as this is the only supported installation types and methods.
RVM 是一个强大的工具,自首次推出以来已经有了很大的发展,RVM 的作者是了解如何安装它的最佳来源。
几年前写过关于如何安装它的页面的人当时可能是准确的,但几年后他们的准确性就全无把握了。
关于ruby - RVM安装ruby没有那个文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16005384/