1

I'm a newbie at Ruby on Rails. I'm trying to update the Gemfile but it keeps giving me this error: "Your Ruby version is 2.3.3, but your Gemfile specified 2.3.0"

The reason I'm trying to update the gem file is because of a security vulnerability:

enter image description here

robinCTS
  • 4,327
  • 4
  • 20
  • 29
  • If you wish to show the the screenshot of the error message as well as the the one of the security warning, please actually upload it. Your original post, plus the revision, have the same screenshot of the warning for both of the links. *That* was why I removed the first link in my edit. – robinCTS Jun 26 '18 at 01:25

1 Answers1

0

The problem is that the installed version of Ruby you have on your system is different to the required version on your app.

You have a few options here:

  • Update the version of ruby in your Gemfile to 2.3.3 so that they match
  • Remove the version constraint in your Gemfile so it won’t be specified
  • Downgrade your system to 2.3.0 (Could be a security issue since you will be using an older version of ruby)
  • The better option though would be to use a ruby version management tool like rbenv or RVM. This way (if using rbenv for example) once installed on your system you can have a file in the project root called .ruby-version where you specify the ruby version you want to use. By running rbenv install, it will then install the required version of ruby for your app and will use that when in the project directory.

After doing any of the above (please pick option 4. When working with many projects it’s much easier), it should work correctly.

KNejad
  • 545
  • 7
  • 17