I was hoping someone could help me, I am going in to first experiences of deploying sites via capistrano however, whenever I run cap deploy:check I get the error the task `staging’ does not exist, what is the problem?
This is is my deploy.rb
set :application, "Myproject"
set :repository, "******@bitbucket.org/simonainley/myproject.git"
set :scm, :git
set :ssh_options, {:forward_agent =>true}
set :stages, %w(staging production)
set :default_stage, "staging"
require 'capistrano/ext/miltistage'
And this is my staging.rb
role :server, "**.**.**.***"
set :user, "user"
set :password, "password"
set :branch, "dev"
set :web_directory, "/home/***/public_html/staging/****"
namespace :deploy do |
desc "Deploys code to the staging enviroment."
task :default_stage, :roles => :server, :except => {:;no_release => true}
run [
"cd #{web_directory}",
"git reset --hard",
"git checkout #{branch}",
"git fetch",
"git pull origin #{branch}" ].join("; ")
end
end
I assume I am missing a setting or variable?
You’ve got a typo; the line should be: