Incorrect ruby version when installing bundle in rails project

2.4k Views Asked by At

I have a problem when running bundle install in the root of sharetribe rails's project. It shows me this error message:

Your Ruby version is 2.4.0, but your Gemfile specified 2.3.1

I tried installing rvm and installing the 2.3.1 version required to run this project but nothing changes and it still throwing this output.

Have anyone faced this problem before ?

3

There are 3 best solutions below

1
On BEST ANSWER

Your Ruby version is 2.4.0, but your Gemfile specified 2.3.1

Steps to resolve this issue

1)rvm install ruby-2.3.1

2)gem install bundler

3)rvm use ruby-2.3.1

4)Bundle install
2
On

Your Ruby version is 2.4.0, but your Gemfile specified 2.3.1

If you run command ruby -v you can see that you have installed Ruby 2.4.0, when you look at the first line in your Gemfile specifies that you want to use Ruby 2.3.1.

You can do either install Ruby 2.3.1 or replace the first line in your Gemfile to with Ruby 2.4.0.

0
On

What does it say when you run bundle env in the terminal?

Is it the same ruby version?

I tried gem install bundler one time i had the same problem and bundle updated and worked.

You can read more about it here.

Good luck!