I have a ruby file in /usr/local/bin. Why?
In the Unix world, to which Mac OS X also belongs, you have all
your files under one big file tree starting with /.
Now, all the packages which are not maintained by some distribution
update tool,e.g. because they’re compiled from source by you, go
to /usr/local in a default way.
/usr/local/bin is then the default directory to put the executable
files. So , in this case, the ruby file there is the executable file
which
allows you to run ruby script files, which you’ve saved anywhere on
your system.
You can also install that executable file elsewhere, but then you
need to specify the path at the installation of Ruby
(in the configure step), so that the system can find it.
So these conventions don’t come from Ruby, really, but from Unix.
Best regards,
Axel