![]() That’s why developers use a version manager such as asdf, chruby, rbenv, or rvm. See the article Do not use the MacOS system Ruby. It’s a bad idea to use the Mac system, Ruby, for developing Ruby applications (it’s fine to use it for running utility scripts). If you see /usr/bin/ruby when you use the which command, it is the pre-installed macOS system Ruby. MacOS comes with a “system Ruby” pre-installed. You can use the which command with the -a flag to see if more than one Ruby executable is installed and where they are installed: $ which -a ruby You may want to know how Ruby is installed and where Ruby is installed. You may want to know more than the Ruby version number. ![]() If Ruby is installed, the which command may show the Ruby version number in the file path: /Users/daniel/.rvm/rubies/ruby-3.0.0/bin/ruby The which command can confirm that Ruby is missing: $ which ruby ![]() ![]() If Ruby is not installed, you’ll see: zsh: command not found: ruby The ruby -v command will show you the Ruby version number. If Ruby is installed, the ruby -v command will show a response like: $ ruby -v To find out what version of Ruby is installed on macOS,enter the following into your terminal application: $ ruby -vĭon’t type the $ character – the $ character is just a cue that you should enter a shell command.
0 Comments
Leave a Reply. |