本文介绍了机架错误安装问题.服务器未启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了 Rack-Bug 并在 config 文件夹中创建了它需要的中间件文件.但是我无法启动我的服务器.我使用 Rails 2.3.4 和 Ruby 1.8.7.

I just installed the Rack-Bug and created the middleware file that it needs in the config folder. But I am unable to start my server.Im using Rails 2.3.4 with Ruby 1.8.7.

/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:443:in     `load_missing_constant': uninitialized constant IPAddr (NameError)

来自/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:80:in const_missing'来自/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:92:inconst_missing'来自/home/xxxxx/xxxx/trunk/config/initializers/middleware.rb:6

from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:80:in const_missing' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:92:inconst_missing' from /home/xxxxx/xxxx/trunk/config/initializers/middleware.rb:6

我不知道我做错了什么.任何帮助都会很棒.

I can't figure out what I am doing wrong. Any help would be great.

推荐答案

我遇到了同样的问题.

解决方案是将以下行放在您的 environment.rb 的顶部(需要 ruby​​ 核心类:http://ruby-doc.org/core/classes/IPAddr.html):

The solution is to put the following line at the top of your environment.rb (requirement of a ruby core class: http://ruby-doc.org/core/classes/IPAddr.html):

需要'ipaddr'

这篇关于机架错误安装问题.服务器未启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-27 08:52