javan / whenever

Cron jobs in Ruby
MIT License
8.83k stars 727 forks source link

whenever error "Bundler::GemNotFound: Your bundle is locked to aasm" #679

Open NSLog0 opened 7 years ago

NSLog0 commented 7 years ago

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 ?

benlangfeld commented 7 years ago

bundle install

NSLog0 commented 7 years ago

@benlangfeld I tired to bundle install but I still got error

benlangfeld commented 7 years ago

You got the error when running bundle install?

NSLog0 commented 7 years ago

@benlangfeld success to install

screen shot 2559-12-16 at 5 35 27 pm
alex-parkhamovich commented 7 years ago

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

benlangfeld commented 7 years ago

Please provide a minimal reproduction app to debug since I can't reproduce this.

jonasva commented 5 years ago

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

bragamat commented 11 months ago

I believe this has had a solution (given the last answer). So maybe we can close out this issue

cc @benlangfeld