How can I permanently change my Ruby version in AWS Cloud9 IDE CLI

123 Views Asked by At

I am working through Michael Hartl's Ruby on Rails Tutorial.

I am using a textbook version, so some of the information is out of date, and I have had to make changes to the Gemfile and update certain other components to work through some exercises, including my Bundler and Ruby itself.

After getting the app running on Heroku, I did a test to see if I could still run it from Cloud9's CLI with $ rails server, but I got the error message Your Ruby version is 2.6.3, but your Gemfile specified 2.7.5.

I was able to fix this by running the following commands:

$ rvm install 2.7.5 $ rvm use 2.7.5

But this fix only works until the next time I sign into Cloud9. Is there a command I can run from the CLI that will permanently update my Ruby version to a specified version? Or is my Ruby version determined some other way, and, if so, how can I fix this so my CLI stays on Ruby 2.7.5 between logins?

0

There are 0 best solutions below