とdelayed_job再起動:私はそうのように私のdelayed_jobワーカーを再起動しようとしていますカピストラーノ
残念ながらtask :restart_dj do
on roles(:app) do
execute "RAILS_ENV=production #{File.join(current_path,'bin','delayed_job')} restart"
end
end
を、私はこれを取得:
DEBUG [64a01587] Command: /usr/bin/env ln -s /home/me/rails/dino/releases/20160906142152 /home/me/rails/dino/releases/current
INFO [64a01587] Finished in 0.177 seconds with exit status 0 (successful).
INFO [713c695b] Running /usr/bin/env mv /home/me/rails/dino/releases/current /home/me/rails/dino as [email protected]
DEBUG [713c695b] Command: /usr/bin/env mv /home/me/rails/dino/releases/current /home/me/rails/dino
INFO [713c695b] Finished in 0.349 seconds with exit status 0 (successful).
INFO [7c2e9550] Running RAILS_ENV=production /home/me/rails/dino/current/bin/delayed_job restart as [email protected]
DEBUG [7c2e9550] Command: RAILS_ENV=production /home/me/rails/dino/current/bin/delayed_job restart
DEBUG [7c2e9550] /home/me/rails/dino/releases/20160906142152/config/boot.rb:1:in `<top (required)>'
DEBUG [7c2e9550] :
DEBUG [7c2e9550] undefined local variable or method `__dir__' for main:Object
DEBUG [7c2e9550] (
DEBUG [7c2e9550] NameError
DEBUG [7c2e9550] )
DEBUG [7c2e9550] from /home/me/rails/dino/releases/20160906142152/config/application.rb:1:in `require_relative'
DEBUG [7c2e9550] from /home/me/rails/dino/releases/20160906142152/config/application.rb:1:in `<top (required)>'
DEBUG [7c2e9550] from /home/me/rails/dino/current/config/environment.rb:2:in `require_relative'
DEBUG [7c2e9550] from /home/me/rails/dino/current/config/environment.rb:2:in `<top (required)>'
DEBUG [7c2e9550] from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
DEBUG [7c2e9550] from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
DEBUG [7c2e9550] from /home/me/rails/dino/current/bin/delayed_job:3:in `<main>'
しかし、私は私の生産コンソール上RAILS_ENV=production bin/delayed_job restart
を実行することができます問題ない。
私はRuby 2.3.1を使用しています。
RAILS_ENV = production bin/delayed_job restart "' '実行しないでください。 – Nathan