1

运行“瘦”网络服务器时出现问题。看起来安装成功,但是当我运行“瘦启动”时,看起来好像瘦开始初始化,但找不到它需要的一些资源。

下面是我的终端会话的审计跟踪。有人可以帮忙吗?根据 Thin docs,安装已正确完成。谢谢

导轨 3.2.12
红宝石 1.9.3

root@pgateway:/var/www/testapp# gem install thin

Fetching: eventmachine-1.0.0.gem (100%)
Building native extensions.  This could take a while...
Fetching: daemons-1.1.9.gem (100%)
Fetching: thin-1.5.0.gem (100%)
Building native extensions.  This could take a while...
Successfully installed eventmachine-1.0.0
Successfully installed daemons-1.1.9
Successfully installed thin-1.5.0
3 gems installed



root@pgateway:/var/www/testapp# thin start
>> Using rack adapter
>> Thin web server (v1.5.0 codename Knife)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop

/usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/backends   /tcp_server.rb:16:in `connect': cannot load such file -- thin/connection (LoadError)
    from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/backends/base.rb:55:in `block in start'
    from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `call'
    from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine'
    from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
    from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/backends/base.rb:63:in `start'
    from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/server.rb:159:in `start'
    from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/controllers/controller.rb:86:in `start'
    from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/runner.rb:187:in `run_command'
    from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/runner.rb:152:in `run!'
    from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/bin/thin:6:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p385/bin/thin:19:in `load'
    from /usr/local/rvm/gems/ruby-1.9.3-p385/bin/thin:19:in `<main>'
    from /usr/local/rvm/gems/ruby-1.9.3-p385/bin/ruby_noexec_wrapper:14:in `eval'
    from /usr/local/rvm/gems/ruby-1.9.3-p385/bin/ruby_noexec_wrapper:14:in `<main>'
4

3 回答 3

8

您似乎安装了与导轨分开的薄

将它添加到您的 gemfile 中,您应该没问题

于 2013-02-14T16:22:05.500 回答
4

如果你想使用 gem,它必须在你的 Gemfile 中。您可以按以下方式解决您的问题:

  • 将以下行添加到您的Gemfilegem 'thin'
  • 更新您当前应用的环境:bundle install
  • 然后启动服务器
于 2013-07-16T10:02:45.657 回答
0

尝试执行以下命令:

cd 到/你的/rails/app

echo 'gem "thin"' >> Gemfile

薄开始

此内容来自https://github.com/macournoyer/thin/issues/115

于 2013-07-16T08:22:03.167 回答