Executable ruby

hi all

I am trying to make the ruby Hello.rb executable in mac os X
this is the Hello.rb
#!/usr/bin/ruby
print “Hello World”

chmod +x Hello.rb

whe I type: Hello.rb
I get the following error: tcsh: Hello.rb: Command not found.

On Mon Aug 25 04:39:04 2008, Pepe S. wrote:

whe I type: Hello.rb
I get the following error: tcsh: Hello.rb: Command not found.

When you type a command the shell looks at all the directories in your
$PATH environment variable, and for good reason ./ (your current
directory) is not included in your path. To execute something in the
current directory you need to type ./Hello.rb

You would run it like this:

./Hello.rb

Cheers
Martin

2008/8/24 Pepe S. [email protected]:

Hi

I had to change the first line
#!/usr/bin/env ruby
print “Hello World”

and run it as you adviced me

./Hello.rb

thanks