-1

I have some cronjobs in my ruby on rails app generated with whenever. How can I activate them? At the moment they don't run when I do rails s.

UPDATE

When I do whenever -w I got this errors:

/usr/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not findbundler (>= 0) amongst [actionmailer-4.2.1, actionpack-4.2.1, actionview-4.2.1, activejob-4.2.1, activesupport-4.2.1, builder-3.2.2, bundler-unload-1.0.2, daemon-1.2.0, erubis-2.7.0, executable-hooks-1.3.2, gem-wrappers-1.2.7, globalid-0.3.3, i18n-0.7.0, loofah-2.0.1, mail-2.6.3, metaclass-0.0.4, mime-types-2.4.3, mini_portile-0.6.2, minitest-5.5.1, mocha-1.1.0, nokogiri-1.6.6.2, rack-1.6.0, rack-test-0.6.3, rails-deprecated_sanitizer-1.0.3, rails-dom-testing-1.0.6, rails-html-sanitizer-1.0.2, rubygems-bundler-1.4.4, rvm-1.11.3.9, thread_safe-0.3.5, tzinfo-1.2.2] (Gem::LoadError)
from /usr/lib/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /usr/lib/ruby/1.9.1/rubygems.rb:1231:in `gem'
from /usr/local/bin/bundle:22:in `<main>'
Felix
  • 5,452
  • 12
  • 68
  • 163

1 Answers1

3

Use the whenever command. This will write the jobs defined in config/schedule.rb to your crontab:

whenever -w

To clear the jobs from your crontab:

whenever -c
infused
  • 24,000
  • 13
  • 68
  • 78
  • How to fix that error http://stackoverflow.com/questions/14933968/whenever-gem-in-rails-error-to-specs-could-not-find-bundler-0-amongst – infused Apr 23 '15 at 15:37
  • and don't know why the error is /usr/lib/ruby/1.9.1/ .. Im running with ruby 2.0.0 – Felix Apr 25 '15 at 06:36