I just installed the Rack-Bug and created the middleware file that it needs in the config folder. But I am una开发者_开发技巧ble 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)
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:in
const_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.
I had the same problem.
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):
require 'ipaddr'
精彩评论