I downloaded asdf the other day and am trying to use it with a ruby on rails project I downloaded from Github.
When I run asdf install
, I get this response:
firebase 9.10.0 is already installed
ruby 2.7.2 is already installed
Then I run rails s
:
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
The project runs on ruby 2.7.2.
.tool-versions:
ruby 2.7.2
node 12.18.3
I installed asdf with homebrew and use oh-my-zhs with the asdf plugin.
EDIT: running
asdf install ruby 2.7.2
just says
ruby 2.7.2 is already installed
Once Homebrew is installed, you can use it to install Ruby.
brew install ruby This will install the latest Ruby version on Homebrew (which is 2.5.0 at the time of this writing) on /usr/local/bin/ruby. Add /usr/local/bin to the start of your PATH so it becomes the default Ruby.
Add this to ~/.profile or ~/.bash_profile.
If you’re using Ruby to run a few scripts then using the Homebrew version is enough