我在运行Yosemite的Mac上的rails环境中设置了ruby和ruby,我正在尝试通过教程。当我在bash终端中执行以下操作时,我立即停止这样做:
$ rvm use ruby-2.2.1@ learn-rails --create
Unknown ruby interpreter version (do not know how to handle): learn-rails.
我相信一切都设置正确。这是我在执行以下操作时得到的结果:
$ rvm list
rvm rubies
ruby-2.2.0 [ x86_64 ]
=* ruby-2.2.1 [ x86_64 ]
# => - current
# =* - current && default
# * - default
和
$ ruby -v
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14]
$ rails -v
Rails 4.2.1
$ rvm -v
rvm 1.26.10 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
$ echo $PATH
/Users/jeff/.rvm/gems/ruby-2.2.1/bin:/Users/jeff/.rvm/gems/ruby-2.2.1@global/bin:/Users/jeff/.rvm/rubies/ruby-2.2.1/bin:/usr/local/heroku/bin:/Users/jeff/.rbenv/shims:/Users/jeff/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/jeff/.rvm/bin
提前感谢您的帮助!
答案 0 :(得分:5)
@
字符与learn-rails
之间不应有空格。额外的空间导致RVM错误地将learn-rails
误解为要使用的Ruby版本。该行应为:
rvm use ruby-2.2.1@learn-rails --create