From: xymip Date: 2007-05-14T12:05:13+09:00 Subject: Re: compare between languages On May 13, 9:15 am, Sebastian Hungerecker wrote: > xymip wrote: > > HI, > > Using terminal with ruby I encountered a problem > > with the puts command. Here is the track: > > > Last login: Sun May 13 05:42:08 on console > > Welcome to Darwin! > > [stefan's-computer-2:~] stivi% echo hello world > > hello world > > [stefan's-computer-2:~] stivi% ruby -v > > ruby 1.8.2(2004-12-25) [universal-darwin8.0] > > [stefan's-computer-2:~] stivi% puts 1+2 > > tcsh: puts: Command not found. > > > Has the command changed? > > tcsh doesn't have a puts command and never had. Ruby has a puts command, but > you didn't actually start ruby, you entered the command into your shell. > You have to start the ruby interpreter or irb before you can enter ruby code. > > -- > NP: Milhaven - Clean Room > Ist so, weil ist so > Bleibt so, weil war so Yes. Thanks both. Starting irb the commands work. I am using Chris Pine's 2005 book to learn ruby on mac. The newer ruby books are still out (lots of demand in our library). They are on reserve and I should get them in a few weeks. In the meantime what is the best way to create a program file and then run it via terminal? Thanks for the help.