NoMethodError: undefined method `on' for main:Object

I had the same error just now after running a bundle update, no major versions were updated, except for Rake to 11. An upgrade from capistrano 3.2.1 to 3.4.0 fixed it for me!


I have the same error.

My capistrano version is 3.1.0, rails version is 4.1.4. But my colleague don't have that problem. I try to change my ruby version, rvm version as same as my colleague' config. It still not work. So I try to gem list all these related gems. I found my sshkit is higher than his.

So I downgrade my sshkit to 1.7.1.

Then it works.