I'm trying to deploy my app with whenever
gem using capistrano 3
.
I added: require "whenever/capistrano"
to Capfile, and:
set :whenever_identifier, ->{ "#{fetch(:application)}_#{fetch(:stage)}" }
to config/deploy.rb.
When I deploy it I get an error:
01 bundler: failed to load command: whenever (/home/deploy/www/laptophits/shared/bundle/ruby/2.2.0/bin/whenever)
NameError: undefined local variable or method `extract' for #<Whenever::JobList:0x00000002edf6c8>
config/schedule.rb:9:in `block in initialize'
When I ssh to production machine and try to run whenever manually with: /home/deploy/www/laptophits/shared/bundle/ruby/2.2.0/bin/whenever
I get error:
/home/deploy/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems.rb:271:in `find_spec_for_exe': can't find gem whenever (>= 0.a) (Gem::GemNotFoundException)
from /home/deploy/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems.rb:299:in `activate_bin_path'
Any idea how to fix it?