Hello I have a strange problem, I'm trying to get rake task working in whenever, but have this problem Could not find rake-10.4.2 in any of the sources (Bundler::GemNotFound)
. It's strange, because it searches this rake version in ruby 2.1.2 version /home/vyivrain/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/spec_set.rb:92
. However I'm using ruby 2.2.0 in rvm and the gem list is also using that version.
It's a simple cron job:
every 1.minute do
rake 'process_email:handle', output: 'log/mail.log', environment: 'development'
end
Rakefile:
namespace :process_email do
desc 'Handle email'
task handle: :environment do
MOBIZARD_MAILER.processor.retrieve_mail
end
end
Mobizard mailer is my own gem, that retrieves mails through ruby mail gem, that uses same ruby 2.2.0 and same gem list.
Whole stack trace in mail.log looks like this:
/home/vyivrain/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find rake-10.4.2 in any of the sources (Bundler::GemNotFound)
from /home/vyivrain/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/spec_set.rb:85:in `map!'
from /home/vyivrain/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/spec_set.rb:85:in `materialize'
from /home/vyivrain/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/definition.rb:133:in `specs'
from /home/vyivrain/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/definition.rb:178:in `specs_for'
from /home/vyivrain/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/definition.rb:167:in `requested_specs'
from /home/vyivrain/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/environment.rb:18:in `requested_specs'
from /home/vyivrain/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:13:in `setup'
from /home/vyivrain/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler.rb:120:in `setup'
from /home/vyivrain/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/setup.rb:17:in `<top (required)>'
from /home/vyivrain/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/vyivrain/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
Thx for answering.