I think the bullet list just before that code listing might be what's confusing you here: "lines beginning with the Ruby shell prompt (irb>) are typed in by the user."
You don't actually type the "irb>", that's the ruby shell prompt (it might be different on your system, on my Mac right now it's ">>"). You type "irb" and hit enter at your system command prompt to start irb, then you just type "1" and hit return, the ruby interpreter will return 1 (no big surprise there!)
Let me know if any of that is unclear and I'll try to help.
Thank you for your help. I'm new to programming and literally do exactly what the book says. Your advice worked. I understand now. While I am at it, I do have one other question for you if you don't mind. When I start Mongrel, I enter ruby script/server. Do I just exit the window when done, or do I wait for some return value. Right now the ruby window just shows blank, no return value.
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart).
** Rails signals registered. HUP => reload (without restart). It might not work well.
** Mongrel 1.1.5 available at 0.0.0.0:3000
** Use CTRL-C to stop.
If you exit the terminal window the Mongrel server will stop, or you can interrupt it by pressing CTRL-C
=> Booting Mongrel =>Rails 2.3.4 application starting on 0.0.0.0:3000 => Call with -d to detach => Ctrl -C to shutdown server This is it, and then a blinking cursor. It wont let me type. Do I just minimize the window and start a new one?
Oh, yeah. That terminal is running the mongrel server, so you can't do anything with it. However, you can start a mongrel server that's not "attached" to that terminal: that's what the "call with -d to detach" means.
So if you run:
ruby script/server -d
your mongrel server will start detached and your command prompt will be back. However if you want to stop that process you need to find it, which can be tricky if you're not used to that sort of thing. Usually the best is just to minimize that window and start another one if you want to do other things at the command line while your server is still running.