asdf message "No version set for command rails" when running Rails server
Asked Answered
L

2

14

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.

Logion answered 1/10, 2019 at 20:29 Comment(1)
The asdf-ruby plugin: github.com/asdf-vm/asdf-rubyPolyphonic
T
17

Try this:

asdf reshim ruby

Then run rails s again

Theory answered 21/10, 2019 at 18:43 Comment(1)
This worked for me, but I had to also restart my shellCarrion
N
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

Normi answered 15/5, 2021 at 16:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.