0

When I run

$bundle env

got the result as:

Bundler 1.5.2
Ruby 2.1.0 (2013-12-25 patchlevel 0) [x86_64-linux]
Rubygems 2.2.1
rvm 1.25.15 (stable)
GEM_HOME /usr/local/rvm/gems/ruby-2.1.0
GEM_PATH /usr/local/rvm/gems/ruby-2.1.0:/usr/local/rvm/gems/ruby-2.1.0@global
rubygems-bundler (1.4.2)

but while running whenever and in console running the tail -f log/cron_log.log I got the following issue

/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.5.0/lib/bundler/spec_set.rb:92:in `block in materialize'/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.5.0/lib/bundler/spec_set.rb:92:in `block in materialize'/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.5.0/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find rake-10.1.1 in any of the sources (Bundler::GemNotFound)

How can I solve this?

EDIT

$crontab -l

35 0 * * * /usr/bin/apt-get update

35 1 * * * /usr/bin/apt-get -y upgrade

# Begin Whenever generated tasks for: trrm
PATH=/usr/local/rvm/gems/ruby-2.1.0/bin:/usr/local/rvm/gems/ruby-2.1.0@global/bin:/usr/local/rvm/rubies/ruby-2.1.0/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

* * * * * /bin/bash -i -c 'cd /var/www/trrm && RAILS_ENV=production bundle exec rake ad_has_expired_task --silent >> log/cron_log.log 2>&1'

0,15,30,45 * * * * /bin/bash -i -c 'cd /var/www/trrm && RAILS_ENV=production bundle exec rake ad_going_to_expire_task --silent >> log/cron_log.log 2>&1'

# End Whenever generated tasks for: trrm
Debadatt
  • 5,935
  • 4
  • 27
  • 40
  • Which command gives the error? – Agis Jan 23 '14 at 09:33
  • running the tail -f log/cron_log.log – Debadatt Jan 23 '14 at 09:34
  • `tail` just open log file! I think you start rake tasks through cron and exactly this task raises exceptions. Show what do you have in cron tasks (`crontab -l` in console) – gotva Jan 23 '14 at 12:11
  • @gotva: Please see the Edit section for crontab -l – Debadatt Jan 23 '14 at 12:35
  • I think if you can run in console `cd /var/www/trrm && RAILS_ENV=production bundle exec rake ad_has_expired_task` (or simple variant `rake -T` instead of real task) then the problem in bash script and exactly with `bash -i -c`. PS I am not close friend with bash – gotva Jan 23 '14 at 12:39

0 Answers0