【发布时间】:2014-02-25 18:14:12
【问题描述】:
我陷入了僵局,需要帮助。 实现一个 Unicorn 初始化脚本,该脚本在尝试将工作目录更改为我的应用程序路径时引发错误(以执行“bundle exec unicorn”)。
Capistrano 输出如下。
DEBUG [50572a40] Starting Unicorn Daemon for accreu
DEBUG [50572a40] Starting Unicorn Daemon for accreu
DEBUG [50572a40] /etc/init.d/unicorn_accreu: 44: cd:
DEBUG [50572a40] Starting Unicorn Daemon for accreu
DEBUG [50572a40] can't cd to /home/ubuntu/apps/accreu;
DEBUG [50572a40] Starting Unicorn Daemon for accreu
DEBUG [50572a40]
DEBUG [50572a40] cd /home/ubuntu/apps/accreu; bundle exec unicorn -D -c config/unicorn.rb -E production
DEBUG [50572a40]
DEBUG [50572a40] /home/ubuntu
相关的初始化行是:
UNICORN_OPTS="-D -c <%= fetch(:unicorn_config) %> -E production"
CMD="cd <%= fetch(:prime_path) %>; bundle exec unicorn $UNICORN_OPTS"
【问题讨论】:
-
你是在安装一些必需的文件系统之前启动它吗?
-
不主动。这是一个 AMI,所以让我检查一下它的分区。
-
到目前为止,我已经通过删除分号';'来更改目录从头到尾。
-
它没有将“bundle exec unicorn”放在正确的目录中。
-
独角兽守护程序启动,但由于它不在应用程序目录中,因此没有加载任何应用程序。通过访问服务器地址确认。
标签: ruby-on-rails postgresql unicorn