无法启动精简服务器Ruby Gem

无法启动精简服务器Ruby Gem,ruby,redmine,thin,Ruby,Redmine,Thin,我正在尝试在我的服务器Redhat 6.2上设置redmine 我打算使用瘦ruby gem与Nginx一起运行。 我在跟踪 我做了以下事情 宝石安装薄 精简安装 这为我提供了/etc/rc.d/thin下的init脚本。YML文件配置如下: --- chdir: /app/redmine-root/ environment: development address: 0.0.0.0 port: 5000 timeout: 30 log: log/thin.log pid: tmp/pids/t

我正在尝试在我的服务器Redhat 6.2上设置redmine 我打算使用瘦ruby gem与Nginx一起运行。 我在跟踪 我做了以下事情

宝石安装薄

精简安装

这为我提供了/etc/rc.d/thin下的init脚本。YML文件配置如下:

---
chdir: /app/redmine-root/
environment: development
address: 0.0.0.0
port: 5000
timeout: 30
log: log/thin.log
pid: tmp/pids/thin.pid
max_conns: 1024
max_persistent_conns: 100
require: []
wait: 30
servers: 4 
daemonize: true
upstream thin_cluster {
    server unix:/tmp/thin.0.sock;
    server unix:/tmp/thin.1.sock;
    server unix:/tmp/thin.2.sock;
    server unix:/tmp/thin.3.sock;
}
现在,当我执行/etc/rc.d/thin start时,它会显示

Starting server on 0.0.0.0:5000 ... 
Starting server on 0.0.0.0:5001 ... 
Starting server on 0.0.0.0:5002 ... 
Starting server on 0.0.0.0:5003 ... 
但是当我在/app/redmine root/tmp/pids下看到pids时,没有pids

因此,我看不到任何服务正在运行。这是第一期

我想问的第二件事是,在上面链接建议的Nginx conf中,上游块如下所示:

---
chdir: /app/redmine-root/
environment: development
address: 0.0.0.0
port: 5000
timeout: 30
log: log/thin.log
pid: tmp/pids/thin.pid
max_conns: 1024
max_persistent_conns: 100
require: []
wait: 30
servers: 4 
daemonize: true
upstream thin_cluster {
    server unix:/tmp/thin.0.sock;
    server unix:/tmp/thin.1.sock;
    server unix:/tmp/thin.2.sock;
    server unix:/tmp/thin.3.sock;
}
但是pid文件位于/app/redmine root/tmp/pids中,这是否可行

第三,在安装时,我将env标记为production

但每当我执行thin config-C/etc/thin/redmine.yml时,它都会变为开发

请注意,我也有RVM。/app/redmine root/的用户和所有者是apache。 我的nginx使用apache运行,我也尝试使用apache运行瘦版

我没有Ruby方面的背景。非常感谢您的帮助

编辑

经过建议,我在日志中找到了这个

/usr/local/lib/ruby/gems/2.0.0/gems/thin-1.5.1/lib/thin/backends/tcp_server.rb:16:in `connect': cannot load such file -- thin/connection (LoadError)
        from /usr/local/lib/ruby/gems/2.0.0/gems/thin-1.5.1/lib/thin/backends/base.rb:55:in `block in start'
        from /usr/local/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
        from /usr/local/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
        from /usr/local/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
        from /usr/local/lib/ruby/gems/2.0.0/gems/thin-1.5.1/lib/thin/backends/base.rb:63:in `start'
        from /usr/local/lib/ruby/gems/2.0.0/gems/thin-1.5.1/lib/thin/server.rb:159:in `start'
        from /usr/local/lib/ruby/gems/2.0.0/gems/thin-1.5.1/lib/thin/controllers/controller.rb:86:in `start'
        from /usr/local/lib/ruby/gems/2.0.0/gems/thin-1.5.1/lib/thin/runner.rb:187:in `run_command'
        from /usr/local/lib/ruby/gems/2.0.0/gems/thin-1.5.1/lib/thin/runner.rb:152:in `run!'
        from /usr/local/lib/ruby/gems/2.0.0/gems/thin-1.5.1/bin/thin:6:in `<top (required)>'
        from /usr/local/bin/thin:23:in `load'
        from /usr/local/bin/thin:23:in `<main>'
这是因为,我正在尝试在UNIX套接字上进行配置还是因为其他原因???

您应该将gem thin添加到gem文件中

注:例如,请参见。

您应该将gem thin添加到gem文件中


PS:例如,请参见。

Thin将创建类似于Thin的pid文件。[port\u number]。pid您的意思是这些文件没有exist@Viren没错,当我启动精简服务器时,/app/redmine root/tmp/pids中没有这样的文件检查日志精简服务器失败如果存在gem版本冲突尝试使用bundle命令bundle exec thin-C/etc/thin/redmine.yml这样最后我让它运行起来。我唯一缺少的是在我的文件中添加thin。谢谢,VirenThin会像thin一样创建pid文件。[port_number].pid你是说那些文件没有exist@Viren没错,当我启动精简服务器时,/app/redmine root/tmp/pids中没有这样的文件检查日志精简服务器失败如果存在gem版本冲突尝试使用bundle命令bundle exec thin-C/etc/thin/redmine.yml这样最后我让它运行起来。我唯一缺少的是在我的文件中添加thin。谢谢你,维伦