Forum How do I...?

private method `chomp' called for nil:NilClass

marmyg
Hello there,

I´m using Prince to pdf generation and I get this noMethod error "private method `chomp' called for nil:NilClass" in prince.rb.

I´ve allready changed a few lines in its code :

@exe_path = "C:\\Archivos de programa\\Prince\\Engine\\bin\\prince".chomp in the initialize method

and I also put the following line after pdf = IO.popen(path, "w+"):

pdf.binmode

I don´t know what is wrong here, i followed this page http://sublog.subimage.com/2007/05/29/html-css-to-pdf-using-ruby-on-rails

I will be very grateful if someone helps me!!:)

Thanking in advance!!!!
mikeday
As far as I can see, chomp is a standard method on the String class, so I don't know why it isn't working. However, it's only useful for removing a trailing newline, so you probably don't need to call it here anyway.