Ruby on rails 捆绑包安装失败,但在使用capistrano部署时仍停止sidekiq
当我使用capistrano部署我的rails应用程序时,bundle安装在stop sidekiq之前,当bundle安装失败时,sidekiq不应该停止,但事实上,sidekiq进程停止了Ruby on rails 捆绑包安装失败,但在使用capistrano部署时仍停止sidekiq,ruby-on-rails,ruby,capistrano,Ruby On Rails,Ruby,Capistrano,当我使用capistrano部署我的rails应用程序时,bundle安装在stop sidekiq之前,当bundle安装失败时,sidekiq不应该停止,但事实上,sidekiq进程停止了 02:01捆绑程序:安装 01$HOME/.rbenv/bin/rbenv exec bundle安装--path/var/www/server/shared/bundle--无开发测试--部署--安静 **部署失败 **有关详细信息,请参阅log/capistrano.log。以下是最后20行: ...
02:01捆绑程序:安装
01$HOME/.rbenv/bin/rbenv exec bundle安装--path/var/www/server/shared/bundle--无开发测试--部署--安静
**部署失败
**有关详细信息,请参阅log/capistrano.log。以下是最后20行:
.........
master@f366d90)
02:03赛德基克:停
01$HOME/.rbenv/bin/rbenv exec bundle安装--path/var/www/server/shared/bundle--无开发测试--部署--安静
01更改后,您正在尝试以部署模式安装
01你的档案。在别处运行“bundle install”,并添加
01将Gemfile.lock更新为版本控制。
01
01来源列表已更改
01
01您已将以下内容添加到文件中:
我的capfile:
require 'capistrano/setup'
# Includes default deployment tasks
require 'capistrano/deploy'
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git
require 'capistrano/rbenv'
# require 'capistrano/chruby'
require 'capistrano/rails'
#require 'capistrano/puma'
#require 'capistrano/puma/jungle'
require 'capistrano/rails/console'
require 'capistrano/sidekiq'
#require 'capistrano/sidekiq/monit'
require "whenever/capistrano"
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
部署.rb
set :application, 'readio'
set :repo_url, 'git@github.com:eum/readio.git'
set :repository_cache, 'git_cache'
set :deploy_via, :remote_cache
set :keep_releases, 2
set :sidekiq_config, -> { File.join(current_path, 'config', 'sidekiq.yml') }
set :whenever_identifier, -> { "#{fetch(:application)}_#{fetch(:stage)}" }
set :whenever_roles, %i[admin]
set :deploy_to, '/var/www/readio_server'
set :rbenv_ruby, File.read('.ruby_version').chomp
set :bundle_bins, fetch(:bundle_bins, []).push('wkhtmltoimage')
set :ssh_options, forward_agent: true, user: 'deploy', keys: %w[~/.ssh/id_rsa], port: 8822
set :pty, false
set :rails_env, :production
set :linked_files, %w[
config/environments/production.rb
config/zetting.yml
config/mongoid.yml
config/puma.rb
]
set :linked_dirs, %w[
log
node_modules
tmp/puma
tmp/cache
tmp/pids
tmp/sockets
resources
]
namespace :deploy do
task :restart do
on roles(:puma_app), in: :sequence, wait: 5 do
execute "/home/deploy/.rbenv/shims/pumactl --state #{current_path}/tmp/puma/state restart"
end
end
after :publishing, :restart
end
这可能是什么原因?调用
sidekiq:stop
的原因是,在Capfile
中,您的Capfile
中有此要求“capistrano/sidekiq”。请记住,在Capfile
中,顺序
很重要。您可以分享deploy.rb
@KedarnagMukanahallipatna感谢您的快速响应!请看我的更新!顺便问一下,这条线在哪里<代码>在Capfile
中需要'capistrano/bundler'我没有将这一行添加到Capfile中,有必要吗?调用sidekiq:stop
的原因是,在Capfile中,您的Capfile中有这个需要'capistrano/sidekiq'
。记住,按顺序排列很重要。