[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Executable ruby

Pepe Sanchez

8/24/2008 7:39:00 PM

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-....

2 Answers

Martin Häger

8/24/2008 7:45:00 PM

0

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-....
>
>

Pepe Sanchez

8/25/2008 12:34:00 AM

0

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-....