panzi panzi - 1 year ago 104
Ruby Question

Capistrano: Could not find rake-$WRONG_VERSION in any of the sources

We use rvm on our servers and I just upgraded to Ruby 2.3.1. Now when I try to deploy our project to the staging server I get this error message:

** Refer to log/capistrano.log for details. Here are the last 20 lines:

DEBUG [49e3047b] Finished in 0.269 seconds with exit status 0 (successful).
INFO [96bd9c75] Running ~/.rvm/bin/rvm default do bundle exec rake gettext:pack as deployer@nginx-stage.webit.local
DEBUG [96bd9c75] Command: cd /home/deployer/PROJECTNAME/current && ( export RAILS_ENV="production" ; ~/.rvm/bin/rvm default do bundle exec rake gettext:pack )
DEBUG [96bd9c75] /home/deployer/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/spec_set.rb:95:in `block in materialize'
DEBUG [96bd9c75] :
DEBUG [96bd9c75] Could not find rake-11.1.2 in any of the sources
DEBUG [96bd9c75] (
DEBUG [96bd9c75] Bundler::GemNotFound
DEBUG [96bd9c75] )
DEBUG [96bd9c75] from /home/deployer/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/spec_set.rb:88:in `map!'
DEBUG [96bd9c75] from /home/deployer/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/spec_set.rb:88:in `materialize'
DEBUG [96bd9c75] from /home/deployer/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/definition.rb:140:in `specs'
DEBUG [96bd9c75] from /home/deployer/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/definition.rb:185:in `specs_for'
DEBUG [96bd9c75] from /home/deployer/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/definition.rb:174:in `requested_specs'
DEBUG [96bd9c75] from /home/deployer/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/environment.rb:19:in `requested_specs'
DEBUG [96bd9c75] from /home/deployer/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/runtime.rb:14:in `setup'
DEBUG [96bd9c75] from /home/deployer/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler.rb:95:in `setup'
DEBUG [96bd9c75] from /home/deployer/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/setup.rb:19:in `<top (required)>'
DEBUG [96bd9c75] from /home/deployer/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
DEBUG [96bd9c75] from /home/deployer/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'

This is very odd, because
has rake at version
! When I ssh to the staging server and do a manual
bundle install
everything works ok, too. This is the
file on the staging server:

BUNDLE_PATH: "/home/deployer/PROJECTNAME/shared/bundle"
BUNDLE_WITHOUT: development:test

I updated capistrano, bundler, passenger and nginx, but I just can't get it to work. I also deleted
without any change. Strangely after running another deploy it created
. See the
? But the Ruby version I installed is

Why would it look for that wrong version of rake anyway? I really have no idea what is going on. Damn it Jim, I'm a software developer, not a system administrator!

Edit: I gave in and actually wrote rake version
into the
. Now I get the same message but for activesupport:

Could not find activesupport-4.2.6 in any of the sources

WTF is going on? Why all these old versions? I don't want them!

Answer Source

I think I solved this by updating the react_on_rails gem. But this is cargo cult computing. I never found out why it behaved that way and I just tried out things. I also deleted tmp/cache.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download