From: Sam Duncan Date: 2011-01-28T06:44:47+09:00 Subject: Re: HELP! New to Ruby and need to debug for work! Chomp! Error So the gets called on your socket in readline is returning nil instead of a string object, and getting #chomp! called on it? def readline(f) (l = f.gets).chomp! puts "srv> " + l if $debug l end What do you see if you change it to; def readline(f) l = f.gets puts "srv> %s" % l if $debug l.chomp! l end ? Sam On 28/01/11 10:11, Doug Blackman wrote: > Hi, > > I programmed years before with .Net, Java, etc. and haven't had any > exposure to Ruby yet. Since I have a background in CS, I can kinda > follow what's going on but I'm stuck with this. > > I have taken over support for a website within our company that allows > users to submit requests. When they submit a request, they are sent an > email through our Exchange server with the request details. I'm getting > an error in the Ruby code that sends the emails. Any help would be > appreciated. > > I've attached a copy of the error and the ruby code where the error is > happening. > > Thanks > > Attachments: > http://www.ruby-forum.com/attachment/5800/GPID_Error_doc_1-25.doc > http://www.ruby-forum.com/attachment/5801/Copy_of_gpid_mail_utils.rb > > >