I'm used to programming in PHP but I'm currently working with a system that uses Ruby on Rails so I need to learn a few bits of Ruby code. Anyway first script that I try to write won't work

and I can't figure out why:
If anyone could help it would be appreciated, Thanks.