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.
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
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs