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?

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
user1611830
  • 4,749
  • 10
  • 52
  • 89

1 Answers1

4

You don’t have Rails installed in your rbenv Ruby installation, so it’s falling back to the rails system binary which is hardcoded to use the system Ruby. Simply gem install rails while using your rbenv Ruby installation.

Andrew Marshall
  • 95,083
  • 20
  • 220
  • 214