当我执行命令: 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