I have the following schedule.rb
every 1.minute do
runner "User.persist_things"
end
But looking at my log/cron.log
file, the output is the following:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- bundler/setup (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /Users/felipeclopes/projects/example/config/boot.rb:6
from script/rails:5:in `require'
from script/rails:5
I am using RVM with ruby, the current version is:
$ ruby --version
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin10.8.0]
So it seems that the cron job is loading the incorrect ruby version, but I don't know how to fix this. Can you help me figuring out?