按照 wiki 的指导,做到:$ rvm install 1.9.2 --with-readline-dir=$rvm_path/usr 前面都正常 ruby-1.9.2-p318 - #fetching ruby-1.9.2-p318 - #downloading ruby-1.9.2-p318, this may take a while depending on your connection... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 8603k 100 8603k 0 0 12925 0 0:11:21 0:11:21 --:--:-- 19434 ruby-1.9.2-p318 - #extracting ruby-1.9.2-p318 to /home/testuser/.rvm/src/ruby-1.9.2-p318 ruby-1.9.2-p318 - #extracted to /home/testuser/.rvm/src/ruby-1.9.2-p318 ruby-1.9.2-p318 - #configuring ruby-1.9.2-p318 - #compiling ruby-1.9.2-p318 - #installing
出现错误提示: Gemset '' does not exist, 'rvm gemset create ' first, or append '--create'. 'ruby' was not found, cannot install rubygems unless ruby is present (Do you have an RVM ruby installed & selected?) ruby-1.9.2-p318 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake). ruby-1.9.2-p318 - #importing default gemsets (/home/testuser/.rvm/gemsets/) Gemset '' does not exist, 'rvm gemset create ' first, or append '--create'. Error running '' under , please read /home/testuser/.rvm/log/ruby-1.9.2-p318/gemsets.initial.log Install of ruby-1.9.2-p318 - #complete Gemset '' does not exist, 'rvm gemset create ' first, or append '--create'.
按照出错提示,输入$ rvm gemset create 'gem' was not found, cannot perform gem actions (Do you have an RVM ruby selected?)
怎么处理呢?
补充:我是在全新安装的 ubuntu11.10 上面按照 wiki 操作: 步骤 2 - 用 RVM 安装 Ruby 环境 $ rvm pkg install readline $ rvm install 1.9.2 --with-readline-dir=$rvm_path/usr 还没有完成 ruby 环境安装就报了如上的错
解决了,参考了这篇帖子 http://wbgen.com/blog/ubuntu-11-10%E5%AE%89%E8%A3%85ruby%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83
没有报错,顺利成功
比较下来大致步骤差不多,但后者不需要$ rvm pkg install readline
其他的依赖包也有些不同,不过也许不是重点,总之解决了,可以继续往下走了,谢谢各位!