gpt4 book ai didi

ruby - Capistrano 部署 "the task staging does not exists"

转载 作者:数据小太阳 更新时间:2023-10-29 08:32:57 25 4
gpt4 key购买 nike

<分区>

我希望有人能帮助我,我正在尝试通过 capistrano 部署站点,但是,每当我运行 cap deploy:check 时,我都会收到错误消息 the task `staging ' 不存在,问题是什么?

这是我的 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

我假设我缺少设置或变量?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com