12

I am trying to run my rails server (rails s) in my Rails 3.2.13 application after having updated my Ruby version in /.ruby-version and /.tools-versions, but get the following message:

asdf: No version set for command rails

you might want to add one of the following in your .tool-versions file:

ruby 2.2.4

However, I had updated ruby in both version files to 2.3.0 and it is reflected in both. When I type asdf which ruby the ruby version is also 2.3.0.

I'd like help understanding why rails s prompts this asdf message, and what I'm missing with how to fix it so that I can run the rails server.

Flux
  • 9,805
  • 5
  • 46
  • 92

2 Answers2

15

Try this:

asdf reshim ruby

Then run rails s again

Jimmy
  • 2,669
  • 1
  • 17
  • 21
2

This did the trick for me in such situation where reshim did not work.

gem update --system

Credits to https://github.com/asdf-vm/asdf-ruby/issues/127#issuecomment-644399342

akostadinov
  • 17,364
  • 6
  • 77
  • 85