0

Yes, my Gemfile does specify 2.3.8, and I want to use 2.3.8. I keep getting this annoying error message whenever I start up my VirtualBox machine. I want to get rid of it permanently.

My question is not a duplicate of this question because I do what that answer says, but it still reverts to the incorrect version. I want to find a fix that permanently sets my Ruby version to the one I want. Otherwise I am opening up a new terminal session and having to install and then use the correct version.

What is confusing is when I rvm uninstall 2.5.1, it says ruby-2.5.1 - #already gone. When I run ruby -v, I get: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]. This is contradicting. I've uninstalled but my Ruby version is still 2.5.1?

I've also ran gem install bundler.

Jessica
  • 1,083
  • 2
  • 12
  • 27
  • 1
    `rvm use 2.3.8 --default` should do it. – Sergio Tulentsev Jun 11 '19 at 15:17
  • Possible duplicate of [How to fix "Your Ruby version is 2.3.0, but your Gemfile specified 2.2.5" while server starting](https://stackoverflow.com/questions/37914702/how-to-fix-your-ruby-version-is-2-3-0-but-your-gemfile-specified-2-2-5-while) – SgtPepper Jun 11 '19 at 15:18
  • @SgtPepper Not a duplicate because that's exactly what I do, but it does not change my Ruby version permanently. I've seen that post – Jessica Jun 11 '19 at 15:34
  • In that case, you likely have installed your Ruby 2.51. some other way rather than with rvm. It might be installed from system packages or some other ruby manager like chruby or rbenv. Still, RVM-installed rubies should normally take precedence before system rubies. Check that your RVM config [is correctly installed](https://rvm.io/rvm/install#3-reload-shell-configuration-amp-test) and makle sure it is properly loaded when running your script (which might not be the case for services rather than an interactive shell) – Holger Just Jun 11 '19 at 15:57
  • You may be right, I did try using ```rbenv```. Must have installed some extra versions of Ruby. Darn! – Jessica Jun 11 '19 at 17:50

0 Answers0