whenever icon indicating copy to clipboard operation
whenever copied to clipboard

Bundler could not find compatible versions for gem "bundler"

Open haider-ali-scitechis opened this issue 11 years ago • 2 comments

I am running a rake task using whenever cron job but its giving error Bundler could not find compatible versions for gem "bundler": complete error is

Bundler could not find compatible versions for gem "bundler": In Gemfile: rails (= 4.1.1) depends on bundler (< 2.0, >= 1.3.0)

Current Bundler version: bundler (1.0.15)

Error only comes when i run my cronjob else my application is running fine Thanks

haider-ali-scitechis avatar Jan 31 '15 20:01 haider-ali-scitechis

Please describe how you installed Ruby and provide your schedule.rb and resulting crontab.

benlangfeld avatar Jun 05 '16 19:06 benlangfeld

FWIW, I'm getting a similar issue, the cronjob seems to be running under "sudo" or some other user that doesn't have access to the deploy user's installed ruby and gems, it only has access to the system ruby/gems.

I installed whenever using capistrano from my development machine. Thanks for any help.

cron log: /var/lib/gems/2.7.0/gems/bundler-2.3.19/lib/bundler/definition.rb:436:in 'validate_ruby!': Your Ruby version is 2.7.4, but your Gemfile specified 3.1.2 (Bundler::RubyVersionMismatch) from /var/lib/gems/2.7.0/gems/bundler-2.3.19/lib/bundler/definition.rb:411:in 'validate_runtime!' from /var/lib/gems/2.7.0/gems/bundler-2.3.19/lib/bundler.rb:157:in 'setup' from /var/lib/gems/2.7.0/gems/bundler-2.3.19/lib/bundler/setup.rb:20:in 'block in <top (required)>' from /var/lib/gems/2.7.0/gems/bundler-2.3.19/lib/bundler/ui/shell.rb:136:in 'with_level' from /var/lib/gems/2.7.0/gems/bundler-2.3.19/lib/bundler/ui/shell.rb:88:in 'silence' from /var/lib/gems/2.7.0/gems/bundler-2.3.19/lib/bundler/setup.rb:20:in '<top (required)>' from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in 'require' from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in 'require'

KevinTriplett avatar Aug 05 '22 17:08 KevinTriplett