我想使用capistrano将我的应用程序部署到我的digitalocean服务器上,但每次我想部署redis时都会弹出一个丑陋的错误:
INFO [a9e1ab5b] Running RBENV_ROOT=$HOME/.rbenv RBENV_VERSION=2.5.3 $HOME/.rbenv/bin/rbenv exec bundle exec sidekiq --index 0 --pidfile /home/deplo
y/app_backend/shared/tmp/pids/sidekiq-0.pid --environment dev --logfile /home/deploy/app_backend/shared/log/sidekiq.log --config /home/depl
oy/app_backend/current/config/sidekiq.yml --daemon as deploy@[server_ip]
DEBUG [a9e1ab5b] Command: cd /home/deploy/app_backend/current && ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.5.3" ; RBENV_ROOT=$HOME/.r
benv RBENV_VERSION=2.5.3 $HOME/.rbenv/bin/rbenv exec bundle exec sidekiq --index 0 --pidfile /home/deploy/app_backend/shared/tmp/pids/sidekiq-0.
pid --environment dev --logfile /home/deploy/app_backend/shared/log/sidekiq.log --config /home/deploy/app_backend/current/config/sidekiq.ym
l --daemon )
DEBUG [a9e1ab5b] invalid option: --index
DEBUG [a9e1ab5b] /home/deploy/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/sidekiq-6.0.7/lib/sidekiq/cli.rb:291:in `parse_options'
/home/deploy/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/sidekiq-6.0.7/lib/sidekiq/cli.rb:205:in `setup_options'
/home/deploy/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/sidekiq-6.0.7/lib/sidekiq/cli.rb:24:in `parse'
/home/deploy/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/sidekiq-6.0.7/bin/sidekiq:27:in `<top (required)>'
/home/deploy/.rbenv/versions/2.5.3/bin/sidekiq:23:in `load'
/home/deploy/.rbenv/versions/2.5.3/bin/sidekiq:23:in `<top (required)>'
/home/deploy/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/bundler/cli/exec.rb:63:in `load'
/home/deploy/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/bundler/cli/exec.rb:63:in `kernel_load'
/home/deploy/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/bundler/cli/exec.rb:28:in `run'
/home/deploy/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:476:in `exec'
/home/deploy/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/deploy/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/home/deploy/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/home/deploy/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:30:in `dispatch'
/home/deploy/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/home/deploy/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:24:in `start'
/home/deploy/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-2.1.2/exe/bundle:46:in `block in <top (required)>'
/home/deploy/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/home/deploy/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-2.1.2/exe/bundle:34:in `<top (required)>'
/home/deploy/.rbenv/versions/2.5.3/bin/bundle:23:in `load'
/home/deploy/.rbenv/versions/2.5.3/bin/bundle:23:in `<main>'
我不知道我的sidekiq.pid文件是否丢失或者我做错了什么。请帮帮我,我已经试着解决了差不多两天了!
1条答案
按热度按时间rryofs0p1#
这个错误很可能是因为sidekiq的第6版不支持pidfile和守护模式。最简单的方法是通过gemfile降级sidekiq:
宝石'sidekiq','<6.0.0'。
https://www.mikeperham.com/2019/09/03/welcome-to-sidekiq-6.0/