I have a ruby script which i want to run as cron job.It runs perfectly fine when i run through command prompt on a linux machine. But when i run that same script using a cron job it fails.
I get following error with string encoding. Not sure why it only complains when i am running as a cron job. I have also set my shell to /bin/bash in crontab, which is same shell as my command prompt.
The error i get is
in `encode': "\xE2" on US-ASCII (Encoding::InvalidByteSequenceError)
the line of code that causes the error is