在Rails目录中,我有一个文件.ruby-version:
1.9.3-p392
我安装了这个版本,即使我使用的Ruby的主要版本是2.1.2
。但对于该项目,我需要1.9.3
在Gemfile中我也有:
source "http://rubygems.org"
ruby "1.9.3"
但是当我去终端的这个目录时,它说:
ruby-1.9.3-p392 is not installed.
To install do: 'rvm install ruby-1.9.3-p392'
但正如我所说:
$ rvm list
ruby-1.9.3-p547 [ x86_64 ]
ruby-2.1.1 [ x86_64 ]
=* ruby-2.1.2 [ x86_64 ]
P.S。我还有另一个警告,但我认为这与此问题无关:
$ rvm list
Warning! PATH is not properly set up, '/Users/alex/.rvm/gems/ruby-2.1.2/bin' is not at first place,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-2.1.2'.
rvm rubies
答案 0 :(得分:1)
您的.ruby-version
文件需要1.9.3-p392
。但是你已经安装了ruby-1.9.3-p547
。这是不同的版本。
要解决此问题,请安装ruby-1.9.3-p392
(错误消息告诉您):
rvm install ruby-1.9.3-p392
或者将您的.ruby-version
文件更改为ruby-1.9.3-p547
并使用该版本。