The preinstalled Ruby is /usr/bin/ruby (note: execute "which ruby" from command line), which is a symbolic link to
So you would think that the location of the gems is under
just like when you install Ruby manually.
But when I looked at the Rails gem under the directory, it was rails-1.2.3.
I performed a search for "rails" gem under each directory under the path as a root user but all the searches found only the same rails-1.2.3.
So finally I performed a search for the entire directory tree, i.e. executed
find / -name "rails" -print
as a root user. And here it is, it found
By the way, as a side note, I wanted to see if "/Library/Ruby/Gems/1.8/gems/rails-2.0.1/bin/rails" is sym-linked from /usr/bin/rails (by executing "ls -alFh /usr/bin/rails"). But it isn't. /usr/bin/rails is not a symbolic link of anything. It's an executable file.
This whole thing is very confusing to me.
All I wanted to do was to look at the Rails 2.0.1 source code.