My script uses mysql, tiny_tds, fileutils, and net/ftp. Running on ruby 1.9.3. It works perfectly fine when I run it from inside the folder.
However, when I add it to cron tab, tiny_tds constantly fails. I dont know if any of the other gems fail as I can't get passed this error:
require': no such file to load -- tiny_tds (LoadError)
I tried executing it from the same shell that crontab would use, and I get that error.
The entire script is just 1 file.
I'm new to ruby so my knowledge is limited in setting up the environment the right way.
In the head of the file I have
#!/usr/bin/ruby
require "mysql"
require "fileutils";
require "tiny_tds"
require "net/ftp"
In short, I get a list of Jobs from mysql, compare that against MsSQL, FTP files over and update mysql again when jobs are done.
And I need to run this from cron.
After researching for a bit, I tried to set set the gems as global, however, I think that may not have worked.
Thanks in advance for any help!