When Apple installs ruby, they install it in /usr/bin and put the 
libraries in /usr/lib. I haven't bothered to take the time to figure 
out how to configure ruby to install in the same locations that Mac OS 
X installs them by default.

When you build ruby 1.8 from source, as you have seen, it goes to 
/usr/local/bin. Since you've built it from source, you should be able 
to run it by using "/usr/local/bin/ruby somefile.rb" (where somefile.rb 
is the script you want to run)

To execute it without having to type the full path name you will have 
to add /usr/local/bin to your "path".  Doing so is very "unix geeky"  
if you are using the "tcsh" shell (which is the default shell that Mac 
OS X sets up when you first install it) then you should be able to 
alter your ".tcshrc" file in your home directory with the following 
command:

echo "setenv PATH ${PATH}:/usr/local/bin" >> ~/.tcshrc

After you do that issue the following 2 commands

source ~/.tcshrc
rehash

At that point you should be able to just use "ruby somefile.rb".  Since 
you've changed the path in your .tcshrc it should work every time you 
start a new terminal from that point on.

BTW when you changed your current directory to /usr/local/bin and tried 
to run ruby and got a "command could not be found" error, it was 
because the command could not be found in your path.  if you want to cd 
to /usr/local/bin and run ruby you could issue the cd command and then 
type "./ruby".  That means, run the ruby that is in the current 
directory.

Scott


On Wednesday, August 27, 2003, at 04:32 PM, paul vudmaska wrote:

> I'm trying to install ruby/eruby and mysql to learn ruby for web stuff
> on os x 10.2
>
> At some point, i think while installing,
> http://www.tmtm.org/ruby/mysql/README_en.html , i wacked my ruby
> install that comes with os x(my fault, not the above)... i tried to
> install in /usr/bin/ruby... then when i noticed that the mysql file
> WAS /usr/bin/ruby....dont laugh, i'm new to this ;)
>
> So i went about getting 1.8. I ran the config...no c compiler so i
> loaded the dev tools and ran
> ../configure
> make
> make install
> using the defaults...everything seemed ok. But i still have no ruby. I
> went into what seems like the install directory /usr/local/bin and try
> to run ruby(it's in there) but i get 'command not found'.
>
> when i do a 'whereis ruby' on the command line i get nothing. 'which
> ruby' nada. I tried adding ruby to my path.../usr/local/bin
>
> I'd really like to check ruby out. Anyone know of an isp who supports
> ruby with mysql/eruby/mod_ruby?
>
> somebody please clue me ;)
>