Ruby 带有Ubuntu初始化脚本的unicorn服务器
我根据这个为unicorn创建了这个Ruby 带有Ubuntu初始化脚本的unicorn服务器,ruby,ubuntu,unicorn,init.d,Ruby,Ubuntu,Unicorn,Init.d,我根据这个为unicorn创建了这个init.d脚本 工作。但每当我尝试 $ sudo service unicorn_app start Starting app -su bundle: command not found 但是我可以通过 $ sudo service unicorn_app stop 在我用手动启动它之后 RAILS_ENV=production rails s -b ip.ip.ip.ip 我通过rbenv和路径在/etc/local上安装了rubyonrail
init.d
脚本
工作。但每当我尝试
$ sudo service unicorn_app start
Starting app
-su bundle: command not found
但是我可以通过
$ sudo service unicorn_app stop
在我用手动启动它之后
RAILS_ENV=production rails s -b ip.ip.ip.ip
我通过rbenv和路径在/etc/local
上安装了rubyonrails
第一个条目重定向到正确的目录:
/usr/local/rbenv/shims
/usr/lcoal/rbenv/bin
要更改脚本找到的捆绑包,我需要做什么?既然我认为这条路是正确的,还有什么会出错呢?提前感谢您的帮助 好的,解决方案是安装rbenv。我需要将行
PATH
和RBENV\u ROOT
添加到我的~/.bash\u配置文件中。在那里添加它们之后,我可以通过sudo service unicorn\u app start启动unicorn
RAILS_ENV=production rails s -b ip.ip.ip.ip
/usr/local/rbenv/shims
/usr/lcoal/rbenv/bin