当轻薄启动时,ruby on rails项目会自动启动

时间:2014-08-04 08:04:04

标签: ruby-on-rails thin

问题状态。

我正在尝试在机器重启时在轨道上启动ruby。

我觉得自己已经成功自动瘦身了。

但是我的ROR页面仍无效。

即:当我打开localhost:3000时,此页面无法显示。

瘦启动时ror项目是否会自动启动? 如果没有,我需要做什么设置?

我在/ home / usr / test

下使用ubuntu,ror项目

2 个答案:

答案 0 :(得分:0)

您需要告诉瘦您要自动运行哪个应用程序以及瘦。

sudo thin config -C /etc/thin/testapp.yml -c /home/usr/test  --servers 3 -e production

您可以交叉检查设置:

cat /etc/thin/testapp.yml

它应该显示如下内容:

--- 
pid: tmp/pids/thin.pid
address: 0.0.0.0
timeout: 30
port: 3000
log: log/thin.log
max_conns: 1024
require: []

environment: production
max_persistent_conns: 512
servers: 3
daemonize: true
chdir: /home/demo/public_html/testapp

来源:Rackspace' Knowledge Center

答案 1 :(得分:0)

试试这个:

您必须在目录/home/usr/test中启动瘦服务器。

尝试通过命令bundle exec thin start运行瘦身。