當我執行命令: rails s
在我的項目,在控制檯顯示以下信息:你的Ruby版本是2.0.0,但你的Gemfile中指定的2.1.2更新不Gemfile中
你的Ruby版本是2.0 2.0,但您的Gemfile指定2.1.2
我執行的命令:
沖泡升級rbenv紅寶石打造 rbenv安裝--list 和版本sion 2.1.2
出現在列表中。
然後,我執行命令:rbenv rehash
,但是當我執行命令時出現相同的消息: rails s
。 在我的Gemfile
文件中,列出了: ruby '2.1.2'
但我不想將此值替換爲以前的版本。
如果我執行:
rvm use 2.1.2
是否顯示:
Warning! PATH is not properly set up,
'/Users/Jarvis/.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'. Using /Users/Jarvis/.rvm/gems/ruby-2.1.2 Warning!
Executable 'ruby' missing, something went wrong with this ruby
installation! Warning! Executable 'gem' missing, something went wrong
with this ruby installation! Warning! Executable 'irb' missing,
something went wrong with this ruby installation!
我做錯了嗎?
'rbenv'旁邊'rvm'可能會導致問題... – 2014-11-22 23:35:43
我與D方。我的建議是使用rbenv或rvm,但不能同時使用。你的項目是否有.ruby-version文件? – 2014-11-22 23:40:48
@NickM真的,沒有。我將卸載'rvm'並保留'rbenv' – MrMins 2014-11-22 23:48:32