I am looking for a path of where ruby gets stored on mac?
I installed macruby on my mac and I am trying to see where it got installed. I want to include the path of macruby in my ruby script. When I do 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 looks like macruby is not present in that location. When I execute "whereis ruby" command on I get back "/usr/bin/ruby"
, but when I execute "whereis ruby-1.9.3-p545"
or "whereis macruby-0.12"
I get nothing.
How do I find the path of where does all these ruby versions lie?
You can get the path to the local executable with
$ which ruby
the rvm rubies are in your rvm directory, which I believe is ~/.rvm/rubies
(I use rbenv so not sure about the details)
The which command should pickup whatever shims/other magic RVM is using to set your shell ruby