Egor
Egor

Reputation: 41

How to change ruby version on linux

I installed rvm on my Linux machine and download simple project from github. I tried to run rails s, but got a error with ruby version:

I executed next commands:

When I opened the project and ran rails s, I got this error

https://i.sstatic.net/VsuKH.png

Update

My Gemfile has ruby 2.3.0

Can't run bundle install because of this error https://i.sstatic.net/oSIgh.jpg w

which rails, which ruby: https://i.sstatic.net/C1DUr.jpg

Upvotes: 0

Views: 4213

Answers (2)

Tyl
Tyl

Reputation: 5252

After checked the errors on your updated screenshot, I think it's better just do this:

rm -r ~/.bundle
bundle
bundle install

Maybe just

rvm reinstall all

then try again.

If permission error happens, run

rvm fix-permissions

And then do it again.

Upvotes: 0

Maciej Pk
Maciej Pk

Reputation: 123

I haven't used rvm, but I'm using rbenv for version management.

From what I've read, it works similarly, although the commands are a little bit different.

Did command rvm use ruby-2.3.0 inside the project folder generate a file called .ruby_version?

It should list the current version of ruby used in this project

Upvotes: 1

Related Questions