2
votes

I am upgrading my app from capistrano v2 to v3. When I run the setup task the following error is thrown

$cap development deploy:setup

cap aborted!

Don't know how to build task 'deploy:setup'
/home/user/.rvm/gems/ruby-2.0.0-p353@user-ui/gems/capistrano-3.0.1/lib/capistrano/application.rb:12:in `run'
/home/user/.rvm/gems/ruby-2.0.0-p353@user-ui/gems/capistrano-3.0.1/bin/cap:3:in `<top (required)>'
/home/user/.rvm/gems/ruby-2.0.0-p353@user-ui/bin/cap:23:in `load'
/home/user/.rvm/gems/ruby-2.0.0-p353@user-ui/bin/cap:23:in `<main>'
/home/user/.rvm/gems/ruby-2.0.0-p353@user-ui/bin/ruby_executable_hooks:15:in `eval'
/home/user/.rvm/gems/ruby-2.0.0-p353@user-ui/bin/ruby_executable_hooks:15:in `<main

/application.rb(It points out 12th line which is super)

def run
  Rake.application = self
  super
end

Capfile

require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/rvm'
require 'capistrano/bundler'

Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }

$ gem list capistrano

* LOCAL GEMS *

capistrano (3.0.1)

capistrano-bundler (1.1.1)

capistrano-rails (1.0.0)

capistrano-rvm (0.0.3)

capistrano-unicorn (0.2.0).

Any help will be appreciated if my mistake is pointed. thanks.

1

1 Answers

0
votes

You should precede your deployment command with "bundle exec ", providing you haven't packed the capistrano gem into bin-stubs.

Try: bundle exec cap production deploy

Running "bundle exec" will ensure that you are using the Capistrano gem that you are expecting. Also be sure to remove any excess gems you don't need.

Holler back if the problem still persists