试图将rails app部署到服务器我面临的问题是,当我尝试使用cap production deploy:start时,'瘦'不会出星。真正奇怪的是,它没有任何错误。 在此之后,我尝试在deplyment服务器上执行此操作
env RAILS_ENV=production bundle exec thin start -C config/thin.yml
Starting server on /home/deployer/app/current/tmp/sockets/thin.0.sock ...
Starting server on /home/deployer/app/current/tmp/sockets/thin.1.sock ...
ls /home/deployer/app/current/tmp/sockets/
ps -aux | grep thin
root 16769 0.0 0.1 15468 908 pts/0 S 11:34 0:00 grep --color=auto thin
thin.yml
chdir: /home/deployer/app/current
environment: production
timeout: 30
log: /home/deployer/app/current/log/thin.log
pid: /home/deployer/app/current/tmp/pids/thin.pid
socket: /home/deployer/app/current/tmp/sockets/thin.sock
max_conns: 1024
max_persistent_conns: 10
require: []
wait: 30
servers: 2
daemonize: true
出了什么问题?
仅在production.log中进行迁移
bundle exec thin start -C config/thin.yml &
返回
Starting server on /home/deployer/app/current/tmp/sockets/thin.0.sock ...
Starting server on /home/deployer/app/current/tmp/sockets/thin.1.sock ...
'bundle exec thin start -C confi…' has ended
答案 哦,回答是log / thin.0.log代码中有一些错误
答案 0 :(得分:1)
通过添加demonize
,您需要production
精简才能在&
中运行它。试试这个:
RAILS_ENV=production bundle exec thin start -C config/thin.yml &