From: Peter Bailey Date: 2012-11-05T22:01:53+09:00 Subject: Re: exception: can't convert nil into String Bartosz Dziewoński wrote in post #1082544: > 2012/11/2 Brian Candler : >> Bartosz Dziewoński wrote in post #1082535: >>> You don't set the pdffile variable anywhere. >> >> ? >> >> He sets it to ARGV[0]. Perhaps he ran the script without providing an >> argument? > > Ugh, that's right, sorry. I don't know why I missed it; perhaps I > should try reading more carefully :/ > > -- Matma Rex Thanks for your responses. I defined the variable with the ARGV, correct. I'm globbing PDFs just to see if there are any PDFs. If there aren't any, then, I exit the script. This script only works on PDFs, in that folder. I run this script, along with many, many other scripts like it, with a scheduling utility called ActiveBatch. I've told that scheduling utility to fire this script when there's one PDF, at least, in the folder. So, yes, the ARGV[0] stands for the one file at a time way of executing against one or more PDF files. Thanks. -- Posted via http://www.ruby-forum.com/.