2014-10-03 91 views
0

我真的不能在这里明白的问题:用rbenv设置本地ruby版本不工作?

➜ myflixx git:(master) ✗ rbenv local 
2.1.1 
➜ myflixx git:(master) ✗ rails -v 
Your Ruby version is 2.0.0, but your Gemfile specified 2.1.1 
➜ myflixx git:(master) ✗ rake -T 
Your Ruby version is 2.0.0, but your Gemfile specified 2.1.1 

为什么抱怨的Ruby 2.0.0版本时,我已经设置了本地版(带rbenv)2.1.1?

这是我失踪的东西吗?谢谢你的时间!

+0

'rbenv版本'的输出是什么?和'cat .ruby-version'? – 2014-10-03 16:41:24

+0

系统 * 2.1.1(由/Users/Fernando_L/documents/ruby/rnr/myflixx/.ruby-version设置)和cat:➜myflixx git :(主)✗cat .ruby-version 2.1.1 – YoniGeek 2014-10-03 17:58:02

回答

0

这确保您的路径设置正确。

在.bashrc中或同等:

export PATH="$HOME/.rbenv/bin:$PATH"

eval "$(rbenv init -)"

安装一切,并在本地定义什么红宝石版本,使用的应用程序。

brew install rbenv ruby-build

rbenv install <ruby-version>

rbenv rehash

rbenv local <ruby-version>

重新启动终端或者源bashrc中。

相关问题