Ninja
Ninja

Reputation: 438

Your Ruby version is 2.3.1, but your Gemfile specified 2.4.1

enter image description here

What is just happening here? I used gem install bundler as well.

Upvotes: 1

Views: 913

Answers (1)

Casper
Casper

Reputation: 34338

I suspect something could be wrong with your rake command. First we check what rake command your shell is choosing for you:

 which rake

From this we saw that it was running the Rake binary from the 2.4.1 RVM folder, which seems correct, but to further verify that it's using the right Ruby version we need to do:

head -1 $(which rake)

And this shows an incorrect shebang line:

#!/usr/bin/env ruby2.3

So you need to edit ruby2.3 to say just ruby here, and that will fix the problem.

However it should not have been ruby2.3 to begin with. So perhaps a better solution is to completely reinstall 2.4.1 with RVM, to make sure the other scripts in ~/.rvm/gems/ruby-2.4.1/bin/ are not affected by the same problem.

Upvotes: 4

Related Questions