whenever
whenever copied to clipboard
whenever error "Bundler::GemNotFound: Your bundle is locked to aasm"
I got message in cron_log.log
Bundler::GemNotFound: Your bundle is locked to aasm (4.11.1), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of aasm (4.11.1) has removed it. You'll need to update your bundle to a different version of aasm (4.11.1) that hasn't been removed in order to install.
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.2/lib/bundler/definition.rb:179:in `rescue in specs'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.2/lib/bundler/definition.rb:173:in `specs'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.2/lib/bundler/definition.rb:233:in `specs_for'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.2/lib/bundler/definition.rb:222:in `requested_specs'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.2/lib/bundler/runtime.rb:118:in `block in definition_method'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.2/lib/bundler/runtime.rb:19:in `setup'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.2/lib/bundler.rb:99:in `setup'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.2/lib/bundler/setup.rb:20:in `<top (required)>'
/usr/local/Cellar/ruby/2.3.1_2/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Cellar/ruby/2.3.1_2/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
my code
set :output, "./cron_log.log"
every '* * * * *' do
runner 'User.send_maill'
end
How do I fix this ?
bundle install
@benlangfeld I tired to bundle install but I still got error
You got the error when running bundle install
?
@benlangfeld success to install
have the same issue. Bundle install completes, but at error.log i have this error. I've changed versions of aasm gem, but it did not help
Please provide a minimal reproduction app to debug since I can't reproduce this.
I fixed that by adding this env variable in my config:
env :BUNDLE_PATH, ENV['BUNDLE_PATH']
My entire config file looks like this:
set :output, "log/cron.log"
env :BUNDLE_PATH, ENV['BUNDLE_PATH']
every 1.minute do
rake 'rebuild_redis_rank'
end
In my docker container I use this to publish the schedule to cron:
whenever --set environment=$RAILS_ENV --update-crontab
I believe this has had a solution (given the last answer). So maybe we can close out this issue
cc @benlangfeld