0

I am using rbenv on OS X. When I run ruby -v, I get "ruby 2.0.0p195" but when I launch rails s I get:

Gemfile syntax error:
/myapp/Gemfile:14: syntax error, unexpected ':', expecting $end
gem "mysql2", group: :mysql

It seems that the Gemfile is processed using Ruby 1.8.7. Why is it so?

4

1 回答 1

4

您的 rbenv Ruby 安装中没有安装 Rails,因此它回退到rails系统二进制文件,该二进制文件经过硬编码以使用系统 Ruby。只需gem install rails在使用您的 rbenv Ruby 安装时。

于 2013-07-07T19:53:11.593 回答