0

I am using whenever gem in my application. And i have scheduled a rake task every 5 minutes. But that rake task is not running every 5 minutes. When i saw the log it gave me error like

`to_specs': Could not find bundler (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError)

this is the content in schedule.rb

every 3.minutes do
    rake "mytask name"
  end
xlecoustillier
  • 16,183
  • 14
  • 60
  • 85
nisha
  • 63
  • 1
  • 1
  • 6

2 Answers2

0

I had same issue solved by putting

env :PATH, '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin' 

instead of

env :PATH, ENV['PATH']

on the top of config/schedule.rb

Pramod Shinde
  • 1,802
  • 1
  • 15
  • 28
0

This issue occurs whenever we changes in your gem file, specially rails / ruby version. I was facing this same issue, here is what I did to get rid of that-

 1. $ gem install bundle
 2. $ bundle install

Now everything working fine.

If you are getting same issue as-

`to_specs': Could not find 'railties' (>= 0) among 23 total gem(s) (Gem::LoadError) 

then here are the steps-
See the link as-
Rails: Could not find railties

 1. $ gem list
 2. $ gem install rails  

It will just download all missing dependencies, including railties.

Hope this will work for you too !!!

Community
  • 1
  • 1
S.Yadav
  • 4,273
  • 3
  • 37
  • 44