I'm at an impasse and need help. Implementing a Unicorn init script that throws an error when it tries to change working directory to my application path (in order to execute 'bundle exec unicorn').
Capistrano output is as follows.
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
The relevant init lines are:
UNICORN_OPTS="-D -c <%= fetch(:unicorn_config) %> -E production"
CMD="cd <%= fetch(:prime_path) %>; bundle exec unicorn $UNICORN_OPTS"
解决方案是在我的生产数据库.yml文件中添加“ host:localhost”。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.