Techioz Blog

Asdf は、ツールのバージョンに基づいて、またはローカル コマンドを使用してローカル バージョンを切り替えません

概要

asdf install を実行すると、次の応答が得られます。

firebase 9.10.0 is already installed
ruby 2.7.2 is already installed

次に、 Rails を実行します。

No preset version installed for command rails
Please install a version by running one of the following:

asdf install ruby 2.7.2

or add one of the following versions in your config file at 
/Users/******/Desktop/****/.tool-versions
ruby 3.0.1

プロジェクトは Ruby 2.7.2 で実行されます。

.tool-バージョン:

ruby 2.7.2
node 12.18.3

私は Homebrew で asdf をインストールし、asdf プラグインで oh-my-zsh を使用しています。

編集: ランニング

asdf install ruby 2.7.2

ただ言う

ruby 2.7.2 is already installed

解決策

Ruby を再シムする必要があります。 asdf reshim Ruby を実行してから、rails s を再度実行してみてください。