2013-02-05 97 views
2

我希望有人可以幫助我,我將首先通過capistrano部署網站的經驗,但是,每當我運行cap deploy:check我得到錯誤任務`暫存'做不存在,這是什麼問題?Capistrano部署「任務暫存不存在」

這是我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' 

這是我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 

我認爲我缺少一個設置或變量?

回答

5

你有一個錯字;該行應爲:

require 'capistrano/ext/multistage'