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.

···

--
Posted via http://www.ruby-forum.com/.

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`

···

On Mon Aug 25 04:39:04 2008, Pepe Sanchez wrote:

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.

--
Fred O. Phillips

BBC7 7572 755F 83E0 3209 504A E4F7 874F 1545 9D41

You would run it like this:

./Hello.rb

Cheers
Martin

···

2008/8/24 Pepe Sanchez <jsnit@jsnit.com>:

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.
--
Posted via http://www.ruby-forum.com/\.

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

···

--
Posted via http://www.ruby-forum.com/.