在启动时启动独角兽

时间:2016-08-25 09:54:08

标签: ruby-on-rails raspberry-pi unicorn rbenv

我正在使用Rails 4 + Nginx + Unicorn,我希望当我的raspberry pi重新启动时,它应该在启动时运行Rails应用程序。

问题:Nginx正在运行,但是独角兽没有运行

我已将/etc/rc.local文件放入以下命令

cd /opt/www/RAILSAPP/current && bundle exec unicorn -E production -c config/unicorn.rb -D

但是当我重新启动时它没有启动。当我通过ssh访问pi并运行命令时它正在工作。

如何在启动时启动独角兽以便为rails应用程序提供服务?

0 个答案:

没有答案
相关问题