gpt4 book ai didi

nginx -/usr/bin/env : ruby_executable_hooks : No such file or directory

转载 作者:行者123 更新时间:2023-12-01 13:26:59 25 4
gpt4 key购买 nike

我正在尝试使用 Capistrano 3.0/Thin/NGINX 部署到 Raspberry Pi 我已经开始工作了,但是在我的重启 block 中我有

namespace :deploy do

desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 5 do
execute '/etc/init.d/thin restart'
execute 'sudo /etc/init.d/nginx restart'
end
end
end

我很高兴

 INFO [128fb9a3] Running /etc/init.d/thin restart on raspberrypi.local
DEBUG [128fb9a3] Command: /etc/init.d/thin restart
DEBUG [128fb9a3] /usr/bin/env:
DEBUG [128fb9a3] ruby_executable_hooks
DEBUG [128fb9a3] : No such file or directory
DEBUG [128fb9a3]

我试过答案 here但没有成功。

如果我通过 SSH 连接到 PI 并以 root 身份运行它们,这些命令似乎可以正常工作。

我应该提到我几乎使用了这个教程:http://creativepsyco.github.io/blog/2013/04/10/deploying-rails-on-nginx-and-thin/进行设置

最佳答案

完全 Hackish 的解决方案

gem rvm1-capistrano3 最终没有为我工作,所以我最终只是像这样硬链接(hard link) ruby_executable_hooksruby

$ ln -s `which ruby_executable_hooks` /usr/bin/ruby_executable_hooks
$ ln -s `which ruby` /usr/bin/ruby

警告,这假设 ruby​​ 是与 RVM 一起安装的,您可能想通过执行 ls -l/usr/bin | 之类的操作来确保您不会覆盖某些内容。 grep ruby

另外我意识到这完全是 hackish,可能不是在生产服务器上做的正确事情,但它在我的 Raspberry-Pi 上对我有用...

关于nginx -/usr/bin/env : ruby_executable_hooks : No such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19661147/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com