From: Lyle Johnson Date: 2002-04-27T06:59:37+09:00 Subject: Re: Help learning Ruby > 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? In the Preface to "Programming Ruby": http://www.rubycentral.com/book/preface.html under the heading "Running Ruby", the authors describe different ways you can run Ruby (i.e. interactively versus interpreting a program file). Running Interactive Ruby (IRB) is a good way to get familiar with some of the basics, before you plunge into your first program. Assuming you've installed the Windows version, you should be able to start IRB by typing IRB at the prompt: C:\>irb irb(main):001:0> puts "Hello, world!" Hello, world! nil irb(main):002:0> exit Because irb reports the return value of any method you call, you're seeing both the action from calling puts() -- it prints the string "Hello, world!" -- as well as the return value of the puts method, which happens to be nil. More often, however, you'll save your programs into a text file (with extension .rb) and then let Ruby interpret that program. For example, C:\>ECHO puts "Hello, world!" > hello.rb C:\>ruby hello.rb Hello, world! C:\> Hope this helps, Lyle