Where is ruby ​​stored on mac?

I am looking for a way where ruby ​​is stored on mac?

I installed macruby on my Mac and I'm trying to see where it was installed. I want to include the macruby path in my ruby ​​script. When I make an rvm list, I get:

=> macruby-0.12 [ i686 ] * ruby-1.9.3-p545 [ x86_64 ] ruby-2.1.1 [ x86_64 ] ruby-2.1.2 [ x86_64 ] ruby-2.1.2-version [ x86_64 ] 

I use #!/usr/local/bin/macruby in my ruby ​​script, but it looks like macruby in this place. When I execute the command “whereis ruby”, I return "/usr/bin/ruby" , but when I execute "whereis ruby-1.9.3-p545" or "whereis macruby-0.12" , I get nothing.

How to find the path where all these ruby ​​versions lie?

+13
ruby ruby-on-rails macruby macos
source share
2 answers

You can get the path to the local executable with

 $ which ruby 

rvm rubies are in your rvm directory, which I believe is ~/.rvm/rubies (I use rbenv, so I'm not sure about the details)

Which command should get everything that uses shims / another magic RVM to set the ruby ​​of your shell

+18
source share

You can find the answer by running one of the following commands:

  which ruby whereis ruby type -P ruby 
+3
source share

All Articles