1

ruby scripts encoding problems with crontab

view story
linux-howto

http://stackoverflow.com – UPDATE: The previous version of the post was the deleted, because the problem was not clear. Original problem: Ruby scripts executed with crontab have problems with unicode strings. Solution When Ruby scripts are run by crontab it ignores # encoding: utf-8 directive. To fix it you need add the -Ku flag to crontab like this. #----------------------------------------------------------------------------- #Min Hour Day Month Weekday Command #----------------------------------------------------------------------------- * * * * * /usr/local/rvm/bin/ruby-1.9.3-p362 -Ku ~/path_to_yo (HowTos)