Could not find rake 10.0.3 in any of the sources when working with Whenever and Capistrano

I am trying to use a gem. Whenever with Capistrano on my Rails application on 3.2.8, working with RVM and gemset for this version of Rails.

I get the following error: Could not find rake-10.0.3 in any of the sources (Bundler :: GemNotFound)

This is the result of the error (which I registered through the file):

/home/some_user/.rvm/gems/ ruby-1.9.3-p286@global /gems/bundler-1.2.1/lib/bundler/spec_set.rb:90:in `block in materialize': Could not find rake-10.0.3 in any of the sources (Bundler::GemNotFound) from /home/some_user/.rvm/gems/ ruby-1.9.3-p286@global /gems/bundler-1.2.1/lib/bundler/spec_set.rb:83:in `map!' from /home/some_user/.rvm/gems/ ruby-1.9.3-p286@global /gems/bundler-1.2.1/lib/bundler/spec_set.rb:83:in `materialize' from /home/some_user/.rvm/gems/ ruby-1.9.3-p286@global /gems/bundler-1.2.1/lib/bundler/definition.rb:113:in `specs' from /home/some_user/.rvm/gems/ ruby-1.9.3-p286@global /gems/bundler-1.2.1/lib/bundler/definition.rb:158:in `specs_for' from /home/some_user/.rvm/gems/ ruby-1.9.3-p286@global /gems/bundler-1.2.1/lib/bundler/definition.rb:147:in `requested_specs' from /home/some_user/.rvm/gems/ ruby-1.9.3-p286@global /gems/bundler-1.2.1/lib/bundler/environment.rb:23:in `requested_specs' from /home/some_user/.rvm/gems/ ruby-1.9.3-p286@global /gems/bundler-1.2.1/lib/bundler/runtime.rb:11:in `setup' from /home/some_user/.rvm/gems/ ruby-1.9.3-p286@global /gems/bundler-1.2.1/lib/bundler.rb:116:in `setup' from /home/some_user/.rvm/gems/ ruby-1.9.3-p286@global /gems/bundler-1.2.1/lib/bundler/setup.rb:17:in `<top (required)>' from /home/some_user/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require' from /home/some_user/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require' from /home/some_user/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require' from /home/some_user/some_user/config/boot.rb:6:in `<top (required)>' from /home/some_user/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from /home/some_user/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from script/rails:5:in `<main>' 

I also got an error when I used Rake 10.0.2 (I did a package update and got Rake 10.0.3, and I left it for testing). Also, I noticed that the sender is looking for more @global when I think it should search by gemset (called @ r328 and is located at / home / some _user / .rvm / gems).

.rvmrc (located inside the project)

 source ~/.profile rvm use 1.9.3@r328 rvm_trust_rvmrcs_flag=1 

.profile

 if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi fi # set PATH so it includes user private bin if it exists if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function 

schedule.rb (for testing)

 set :output, "#{path}/log/cron.log" every 1.minute do runner "MenuOrder.send_resume(2)" end 

deploy.rb

 set :whenever_command, "bundle exec whenever" require "whenever/capistrano" 

Listing Gemstones

 actionmailer (3.2.8) actionpack (3.2.8) active_utils (1.0.5) activeadmin (0.5.0) activemerchant (1.29.3, 1.28.0) activemodel (3.2.8) activerecord (3.2.8) activeresource (3.2.8) activesupport (3.2.8) arbre (1.0.1) arel (3.0.2) authorize-net (1.5.2) bcrypt-ruby (3.0.1) bourbon (3.0.1, 2.1.2, 2.1.1) builder (3.0.4) bundler (1.2.1) capistrano (2.13.5) carrierwave (0.8.0, 0.7.1, 0.7.0) chronic (0.9.0) cocaine (0.4.2) coffee-rails (3.2.2) coffee-script (2.2.0) coffee-script-source (1.4.0) daemon_controller (1.1.0) daemons (1.1.9) delayed_job (3.0.4) delayed_job_active_record (0.3.3) devise (2.2.0, 2.1.2) erubis (2.7.0) execjs (1.4.0) fastercsv (1.5.5) fastthread (1.0.7) formtastic (2.2.1) has_scope (0.5.1) highline (1.6.15) hike (1.2.1) i18n (0.6.1) inherited_resources (1.3.1) journey (1.0.4) jquery-rails (2.1.4, 2.1.3) json (1.7.6, 1.7.5) kaminari (0.14.1) mail (2.4.4) meta_search (1.1.3) mime-types (1.19) money (5.1.0) multi_json (1.5.0, 1.3.7, 1.3.6) mysql2 (0.3.11) net-scp (1.0.4) net-sftp (2.0.5) net-ssh (2.6.2) net-ssh-gateway (1.1.0) nokogiri (1.5.6, 1.5.5) orm_adapter (0.4.0) paperclip (3.4.0, 3.3.1) passenger (3.9.1.beta, 3.0.19, 3.0.18) polyamorous (0.5.0) polyglot (0.3.3) rack (1.4.3, 1.4.1) rack-cache (1.2) rack-raw-upload (1.1.1, 1.1.0) rack-ssl (1.3.2) rack-test (0.6.2) rails (3.2.8) railties (3.2.8) rake (10.0.3, 10.0.2, 0.9.2.2) rdoc (3.12) recaptcha (0.3.4) responders (0.9.3) rich (1.4.1, 1.3.1) rmagick (2.13.1) rubygems-bundler (1.1.0) rvm (1.11.3.5) sass (3.2.5, 3.2.3, 3.2.1) sass-rails (3.2.5) sprockets (2.1.3) thor (0.16.0) tilt (1.3.3) treetop (1.4.12) tzinfo (0.3.35, 0.3.34) uglifier (1.3.0) warden (1.2.1) whenever (0.8.1) 

I tried updating the package by removing Gemfile.lock and installing the package, removing all the rakes (10.0.3 and 10.0.2) and installing the pearl with the package installed, but nothing worked.

+4
source share
5 answers

What I did to solve the problem was a bit complicated:

  • Uninstall All Rake Versions
  • Delete Gemfile.lock
  • Run batch installation
  • Install Rake manually with: gem install rake --version = 10.0.2

Now it works, but for some reason it is not writing a log file. I will fix this and post the update.

+3
source

you can use

 bundle install --path vendor/cache 

Hope this helps you.

+10
source

Just for me was bundle install . I think it was because I updated Ruby, but then I forgot to run the package later.

+2
source

So that the error is received when you start the rake task or when you set up the rake task when using cron? If you think this is some kind of gem, I KNOW that there was a lot of discussion about when it doesn’t work, because Capistrano actually changed some of the internal elements and they slowly fix them, but they did not release an update for the gem.

Run a search for their problems and see if you can find what is related to you:

https://github.com/javan/whenever/issues

0
source

This issue is actually related to BUNDLE_PATH overriding the gemset rvm settings and saving downloaded files elsewhere when you run bundle install . To solve this problem, you can either delete your .bundle folder or delete the BUNDLE_PATH line from .bundle / config. Just re-install the package as soon as it is done, and you should be kind!

0
source

All Articles