I wan to run "simple" cron using whenever on Windows XP. So I installed whenever gem install whenever
and then ran my cron.rb
require 'rubygems'
require 'whenever'
every 1.days, :at => '5:30am' do
command "puts now"
end
but it complained that
You don't have i18n installed in your application.
Please add it to your Gemfile and run bundle install
So I ran gem install i18n
and now the same code gives me an error
C:whenever>ruby cron.rb
cron.rb:4: undefined method 'every' for main:Object (NoMethodError)
Any idea how I can make whenever gem work?
- ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
- gem 1.3.7
LOCAL GEMS
aaronh-chronic (0.3.9)
activesupport (3.0.9)
backports (1.18.2)
daemons (1.1.0)
delayed_job (2.0.3)
eventmachine (0.12.10 x86-mswin32-60)
fastercsv (1.5.4)
haml (3.0.21)
i18n (0.6.0)
json (1.5.1)
mechanize (1.0.0)
monkey-lib (0.5.4)
nokogiri (1.5.0 x86-mingw32, 1.4.3.1 x86-mingw32)
rack (1.2.1)
rdiscount (1.6.8)
ruby-growl (3.0)
sinatra (1.2.6, 1.0)
sinatra-advanced-routes (0.5.1)
sinatra-reloader (0.5.0)
sinatra-sugar (0.5.1, 0.5.0)
thin (1.2.7 x86-mswin32)
tilt (1.3)
whenever (0.6.8)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…