> 
> On 4/25/02 11:09 PM, "Euan Mee" <lucid / connectfree.co.uk> wrote:
> > The Pickaxe book's formal title is:
> > Programming Ruby: The Pragmatic Programmer's Guide
> 
> I looked at the online version, and they still don't explain how 
> to do the
> simplest things. I open ruby, and type 'Print "Hello world!"'... Nothing
> happens!!
>     How do you compile/interpret a ruby file?
>     thanks


There are a few ways to execute Ruby programs.  
1) Command line:

ruby -e 'print "Hello world!"'

2)  From a file

create a file called hello.rb.  Add this text:

    print "Hello world!"

save it.

At the command line:

    ruby  hello.rb

If you are on Unix, add this to the top of hello.rb

  #!/usr/local/bin/ruby

Save the file, and make it executable

       chmod ugo+x hello.rb

Now run it using
  ./hello.rb

3) irb

run irb at the command line, and enter the Ruby commands to run:

  [james@james180 james]$ irb
  irb(main):001:0> print "Hello, world!"
  Hello, world!nil
  irb(main):002:0>



James



>     David Salamon
> 
>