/usr/bin/env ruby 没有这样的文件 digitalocean unicorn nginx

/usr/bin/env ruby no such file digitalocean unicorn nginx

我从服务器上删除了 RVM 并重新安装了它。但是自从重新安装 RVM 以来,我遇到了这个错误。 我正在为 deployment.Whenever 使用 Capistrano 我重新启动了 Unicorn 我收到了这个错误

E, [2017-01-31T05:36:33.653206 #7453] ERROR -- : reaped #<Process::Status: pid 15309 exit 127> exec()-ed
I, [2017-01-31T05:39:42.348526 #7453]  INFO -- : reloading config_file=/home/current/config/unicorn.rb
E, [2017-01-31T05:39:42.403642 #7453] ERROR -- : error reloading config_file=/home/current/config/unicorn.rb: No such file or director$
E, [2017-01-31T05:39:42.403843 #7453] ERROR -- : /home/shared/bundle/ruby/2.3.0/gems/unicorn-5.2.0/lib/unicorn/util.rb:71:in `initialize'
E, [2017-01-31T05:39:42.403889 #7453] ERROR -- : /home/shared/bundle/ruby/2.3.0/gems/unicorn-5.2.0/lib/unicorn/util.rb:71:in `open'
E, [2017-01-31T05:39:42.403957 #7453] ERROR -- : /home/shared/bundle/ruby/2.3.0/gems/unicorn-5.2.0/lib/unicorn/util.rb:71:in `block in reopen_$
E, [2017-01-31T05:39:42.404012 #7453] ERROR -- : /home/shared/bundle/ruby/2.3.0/gems/unicorn-5.2.0/lib/unicorn/util.rb:40:in `each'
E, [2017-01-31T05:39:42.404089 #7453] ERROR -- : /home/shared/bundle/ruby/2.3.0/gems/unicorn-5.2.0/lib/unicorn/util.rb:40:in `reopen_logs'
E, [2017-01-31T05:39:42.404169 #7453] ERROR -- : /home/shared/bundle/ruby/2.3.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:731:in `load_con$
E, [2017-01-31T05:39:42.404237 #7453] ERROR -- : /home/shared/bundle/ruby/2.3.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:314:in `join'
E, [2017-01-31T05:39:42.404308 #7453] ERROR -- : /home/shared/bundle/ruby/2.3.0/gems/unicorn-5.2.0/bin/unicorn:126:in `<top (required)>'
E, [2017-01-31T05:39:42.404390 #7453] ERROR -- : /home/shared/bundle/ruby/2.3.0/bin/unicorn:23:in `load'
E, [2017-01-31T05:39:42.404452 #7453] ERROR -- : /home/shared/bundle/ruby/2.3.0/bin/unicorn:23:in `<main>'
I, [2017-01-31T05:39:42.505115 #7453]  INFO -- : reaped #<Process::Status: pid 15209 exit 0> worker=1
I, [2017-01-31T05:39:42.511521 #7453]  INFO -- : reaped #<Process::Status: pid 15206 exit 0> worker=0
I, [2017-01-31T05:39:42.533619 #17166]  INFO -- : worker=1 ready
I, [2017-01-31T05:39:42.533622 #17169]  INFO -- : worker=0 ready
I, [2017-01-31T05:39:43.618823 #17269]  INFO -- : executing ["/home/shared/bundle/ruby/2.3.0/bin/unicorn", "-c", "/home/current/config/unicorn$
I, [2017-01-31T05:39:43.619090 #17269]  INFO -- : forked child re-executing...
/usr/bin/env: ruby: No such file or directory
E, [2017-01-31T05:39:43.625102 #7453] ERROR -- : reaped #<Process::Status: pid 17269 exit 127> exec()-ed**

我会完全停止独角兽并重新开始。你可以做一个 ps -ef | grep unicorn 来确保它都消失了。如果您所做的只是要求主人重新启动 children,他们将不会注意到您的初始化脚本有任何更新。