Prabhakaran
Prabhakaran

Reputation: 4019

capistrano deployment error cap aborted

Here is my deploy.rb

set :application, "admin"
set :repository,  "here is my bitbucket repository"

set :scm, :git
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
set :branch, "master"

set :rails_env, "production"

set :deploy_via, :copy

set :ssh_options, { forward_agent: true, port: 2020 }

set :keep_releases, 5

server "admin.mydomain.com", :app, :web, :db, primary: true

set :deploy_to "/var/www/vhosts/admin"

I have referred two links for configuring capistrano

link 1 and link 2

when i run cap deploy:setup

I am getting error as

cap aborted!
cannot load such file -- deploy
/home/seting/Documents/site/admin/Capfile:1:in `load'
/home/seting/Documents/site/admin/Capfile:1:in `<top (required)>'
/home/seting/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/lib/capistrano/application.rb:22:in `load_rakefile'
/home/seting/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/lib/capistrano/application.rb:12:in `run'
/home/seting/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/bin/cap:3:in `<top (required)>'
/home/seting/.rvm/gems/ruby-2.0.0-p247/bin/cap:23:in `load'
/home/seting/.rvm/gems/ruby-2.0.0-p247/bin/cap:23:in `<main>'
/home/seting/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
/home/seting/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `<main>'
(See full trace by running task with --trace)

Edit 1

This is my cap file

load 'deploy'
# Uncomment if you are using Rails' asset pipeline
     load 'deploy/assets'
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy' # remove this line to skip loading any of the default tasks

Upvotes: 1

Views: 3750

Answers (3)

Igor  Biryukov
Igor Biryukov

Reputation: 270

If you use RVM >= 1.11.3, you should add rvm-capistrano gem to your Gemfile and then bundle install.

Upvotes: 5

Samir Seetal
Samir Seetal

Reputation: 402

On line 1 of your capfile, instead of

load 'deploy'

use

load 'deploy' if respond_to?(:namespace)

Upvotes: 0

usha
usha

Reputation: 29369

It should be

cap deploy:setup

not

cap:deploy:setup

Upvotes: 0

Related Questions