Il 29/05/10 21.43, Emma Pidre ha scritto:
> Hi, i am in Osx and i had installed Ruby 1.8.7. I want to make a
> tutorial, i am a beginner in ruby. My problem is that when i want to
> execute a program on ruby, example: code.rb, with "ruby code.rb" on
> Terminal, like all tutorials sais, a error come back: "-bash: code.rb:
> command not found"
>
> Well, there is a part that i am missing. Please help me.
>    
It's ok, you want to run it as a normal command if i understand well. 
First thing to do, is adding a "shebang"[1] at top of your ruby file. 
After that, you have to make it executable, and, to do it you have to 
write on bash command line, chmod +x code.rb and voil, your ruby script 
as executable in this way: ./code.rb

Have fun with ruby,
-Francesco



[1] shebang: "/usr/bin/env ruby"