2016-09-26 2 views
3

私はRails 4.0.0、Ruby 2.3、Unicornを使用しています。ユニコーンがループしている:Refreshing Gemリスト

私のアプリケーションは、私のGemfileにnem gemを追加しようとした日まで完全に動作していました。すべてはのは、ローカルで魔法のように働いて、私はカピストラーノを使用して行うために展開するときに、私はエラーでループで動けなくなる:

E, [2016-09-26T11:40:29.801388 #24545] ERROR -- : reaped #<Process::Status: pid 4280 exit 1> worker=0 
I, [2016-09-26T11:40:29.802952 #4287] INFO -- : Refreshing Gem list 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/activesupport-4.0.0/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now 
E, [2016-09-26T11:40:32.116762 #4287] ERROR -- : uninitialized constant Vimeo::HTTParty (NameError) 
/home/deployer/apps/my_app/releases/20160924171252/app/controllers/webinars_controller.rb:2:in `<class:Vimeo>' 
/home/deployer/apps/my_app/releases/20160924171252/app/controllers/webinars_controller.rb:1:in `<top (required)>' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/engine.rb:465:in `block (2 levels) in eager_load!' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/engine.rb:464:in `each' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/engine.rb:464:in `block in eager_load!' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/engine.rb:462:in `each' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/engine.rb:462:in `eager_load!' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/engine.rb:347:in `eager_load!' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/application/finisher.rb:56:in `each' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers' 
/home/deployer/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each' 
/home/deployer/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component' 
/home/deployer/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from' 
/home/deployer/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component' 
/home/deployer/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each' 
/home/deployer/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `call' 
/home/deployer/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component' 
/home/deployer/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each' 
/home/deployer/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing' 
/home/deployer/apps/my_app/releases/20160924171252/config/environment.rb:5:in `<top (required)>' 
config.ru:4:in `require' 
config.ru:4:in `block in <main>' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize' 
config.ru:1:in `new' 
config.ru:1:in `<main>' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn.rb:56:in `eval' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn.rb:56:in `block in builder' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:752:in `build_app!' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:617:in `init_worker_process' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:639:in `worker_loop' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:508:in `spawn_missing_workers' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:519:in `maintain_worker_count' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:283:in `join' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/unicorn-5.1.0/bin/unicorn:126:in `<top (required)>' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/bin/unicorn:23:in `load' 
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/bin/unicorn:23:in `<top (required)>' 
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/cli/exec.rb:74:in `load' 
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/cli/exec.rb:74:in `kernel_load' 
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/cli/exec.rb:27:in `run' 
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/cli.rb:332:in `exec' 
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run' 
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command' 
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch' 
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/cli.rb:20:in `dispatch' 
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start' 
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/cli.rb:11:in `start' 
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/exe/bundle:34:in `block in <top (required)>' 
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors' 
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/exe/bundle:26:in `<top (required)>' 
/home/deployer/.rvm/gems/ruby-2.3.0/bin/bundle:23:in `load' 
/home/deployer/.rvm/gems/ruby-2.3.0/bin/bundle:23:in `<main>' 
/home/deployer/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval' 
/home/deployer/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>' 

私はこれからコードを使用することができますので、私は、起こっている内容を正確に把握していません新しいGemはローカルにインストールされますが、ロードされないか、インストールされません。

Googleでの検索で問題が発生する可能性はあるものの、以前は宝石を追加していないために確認する方法がわからないため、構文エラーが古くなる可能性があります。構文エラーがあるかどうかを調べるツールはありますか?そして私はそれが現地で働いているので奇妙です。ここ

マイGemfile

source 'https://rubygems.org' 

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 
gem 'rails', '4.0.0' 

# Use SCSS for stylesheets 
gem 'sass-rails', '~> 4.0.0' 

# Use Uglifier as compressor for JavaScript assets 
gem 'uglifier' 

# Use CoffeeScript for .js.coffee assets and views 
gem 'coffee-rails', '~> 4.0.0' 

# See https://github.com/sstephenson/execjs#readme for more supported runtimes 
# gem 'therubyracer', platforms: :ruby 

# Use jquery as the JavaScript library 
gem 'jquery-rails' 

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks 
gem 'turbolinks' 
gem 'jquery-turbolinks' 

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 
gem 'jbuilder', '~> 1.2' 

# gem 'anjlab-bootstrap-rails', :require => 'bootstrap-rails', :github => 'anjlab/bootstrap-rails' 
gem 'bootstrap-sass', '~> 3.2.0' 

gem 'devise' 

gem 'paperclip', '~> 3.0' 
gem 'aws-sdk', '~> 1' 
gem 'nokogiri', '~> 1.5.1' 

gem 'wicked_pdf' 
# gem "wkhtmltopdf-heroku", :git => 'git://github.com/camdez/wkhtmltopdf-heroku.git' 
gem "wkhtmltopdf-binary" 
gem 'newrelic_rpm' 
gem 'validates_email_format_of' 
# gem 'will_paginate', '~> 3.0.6' 
gem 'will_paginate-bootstrap' 

gem 'iconv' 
gem 'roo' 
gem 'roo-xls' 

gem 'airbrake', '~> 4.3' 
gem "paranoia", "~> 2.0" 
gem 'ransack' 

gem 'omniauth-facebook' 
gem 'omniauth-google-oauth2' 
gem 'activerecord-session_store', github: 'rails/activerecord-session_store' 
gem 'nested_form_fields' 
gem 'httparty' 


group :doc do 
    # bundle exec rake doc:rails generates the API under doc/api. 
    # gem 'sdoc', require: false 
end 

# Use ActiveModel has_secure_password 
# gem 'bcrypt-ruby', '~> 3.0.0' 

# Use unicorn as the app server 

# Use Capistrano for deployment 
group :development do 
    gem 'sqlite3' 
    gem 'awesome_print' 

    gem "capistrano", "~> 3.6" 
    gem 'capistrano-rails', '~> 1.1' 
    gem 'capistrano-rvm' 
    gem 'capistrano3-unicorn' 

    gem 'capistrano-local-precompile', require: false 
end 

group :production do 
    gem 'unicorn' 
    gem 'pg' 
    gem 'rails_12factor' 
end 

# Use debugger 
# gem 'debugger', group: [:development, :test] 

答えて

0

同様の問題。あなたがGemfileを変更すると、unicorn:reloadを使って新しいコードが実行されません。

ユニコードを再読み込みする代わりに再起動しました。正常に動作していないhttps://github.com/tablexi/capistrano3-unicorn/issues/45unicorn:restartによると

invoke 'unicorn:stop' 
invoke 'unicorn:start' 

あなたはカピストラーノを使用している場合は、へ invoke 'unicorn:reload'から後の展開トリガーを変更します。

0

私たちの問題は、それがで殺されたため、ユニコーンマスタープロセスは、正常に再起動されていなかったということでした。実際にユニコーンマスター・プロセスを(のみ設定を再ロードし、SIGHUPのマニュアルを参照してください)殺さない

/bin/kill -s HUP `cat tmp/pids/unicorn.pid` 

ps -ef | grep 'unicorn'を実行して確認します。

/bin/kill `cat tmp/pids/unicorn.pid` 

PS:

私たちの問題はとユニコーンマスタープロセスの殺害を変え解決したcat tmp/pids/unicorn.pidはちょうどユニコーンマスタープロセスのPIDを出力します。

関連する問題