Capistrano error: undefined method `already_invoked 'for <Rake :: Download task: defaults => []>: Rake :: Task

I spent too much time debugging and I have no idea what is going on. Disposal of the production of caps worked fine this morning, and now it just throws an error. So far, Google has not helped much, surprisingly. Nothing has changed in the code base that I know of:

➜ sesac-mm-matching git:(deploy) cap production deploy --trace ** Invoke production (first_time) ** Execute production cap aborted! NoMethodError: undefined method `already_invoked' for <Rake::Task load:defaults => []>:Rake::Task /Users/***/.rvm/gems/ruby-2.3.0@global/gems/capistrano-3.6.0/lib/capistrano/dsl.rb:16:in `invoke' /Users/***/.rvm/gems/ruby-2.3.0@global/gems/capistrano-3.6.0/lib/capistrano/setup.rb:24:in `block (2 levels) in <top (required)>' /Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `block in execute' /Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `each' /Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `execute' /Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain' /Users/***/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize' /Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain' /Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/task.rb:165:in `invoke' /Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/application.rb:150:in `invoke_task' /Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block (2 levels) in top_level' /Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `each' /Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block in top_level' /Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/application.rb:115:in `run_with_threads' /Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/application.rb:100:in `top_level' /Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/application.rb:78:in `block in run' /Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling' /Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/application.rb:75:in `run' /Users/***/.rvm/gems/ruby-2.3.0@global/gems/capistrano-3.6.0/lib/capistrano/application.rb:14:in `run' /Users/***/.rvm/gems/ruby-2.3.0@global/gems/capistrano-3.6.0/bin/cap:3:in `<top (required)>' /Users/***/.rvm/gems/ruby-2.3.0/bin/cap:23:in `load' /Users/***/.rvm/gems/ruby-2.3.0/bin/cap:23:in `<main>' /Users/***/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval' /Users/***/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>' Tasks: TOP => production 

Can anybody give any direction?

+8
ruby capistrano
source share
1 answer

Yes, it looks like you found a bug in the recently released Capistrano 3.6.0. Report an error here: https://github.com/capistrano/capistrano/issues

The main problem is that Capistrano 3.6.0 is (mistakenly) incompatible with Rake <11.0.0.

In the meantime, you can work around this problem by upgrading Rake to version 11.0.0 or higher using gem install rake or bundle update rake (depending on whether you use bundle exec for Capistrano or not).

If you cannot upgrade Rake, downgrade Capistrano to version 3.5.0 until the error is fixed.

Update: Capistrano 3.6.1 has been released and is recovering compatibility with Rake <11.0.0.

+11
source share

All Articles