Exec Perl Script

if you're trying to execute the file, than try the %x() sytax:

output = %x("#{RAILS_ROOT}/ProtectedFiles/bin/personalizePDF.pl
#{self.filename} '#{user.fullname}' #{user.username}")

ed

if you're trying to execute the file, than try the %x() sytax:

output = %x("#{RAILS_ROOT}/ProtectedFiles/bin/personalizePDF.pl
#{self.filename} '#{user.fullname}' #{user.username}")

ed

Isn't backtick and %x the same thing?

>
> I have a small perl script, used to watermark and personalized a pdf
> file for download. I have been unsuccessful in getting the script to
> execute
>
> output = `#{RAILS_ROOT}/ProtectedFiles/bin/personalizePDF.pl
> #{self.filename} "#{user.fullname}" #{user.username}`
>

How do you know that the script didn't run? I would look for the
obvious problems, like permissions. Can the user that is runing your
rails app get to the file? What are the permissions on the directory?
Does the file personalizePDF.pl have the execute bit set? etc.
How about redirecting stderr to a file in /tmp and see if a) the file
gets created and if there are problems with running it?
Lots of investigation to be done.
Bruce.