Почему ошибка?
Вот настройки:
конфиг / Инициализаторы / rack_ip_restrictor.rb
Rack::IpRestrictor.configure do
respond_with [403, {'Content-Type' => 'text/html'}, '']
ips_for :test do
add '127.0.0.1'
add '127.0.0.2/8'
end
restrict /^\/admin/, '/admin', :only => :test
end
конфиг / application.rb
class Application < Rails::Application
...
config.middleware.use Rack::IpRestrictor.middleware
...
end
/ Библиотека / rack_ip_restrictor.rb
require 'ipaddr'
require 'active_support/core_ext/array/extract_options'
# namespace Rack
module Rack
# namespace IpRestrictor
module IpRestrictor
class << self
attr_reader :config
# @see Config#initialize
def configure(&block)
@config = IpRestrictor::Config.new
@config.instance_eval &block
end
# Rack middleware
# @return [Middleware] The configured plug & play Rack middleware
def middleware
IpRestrictor::Middleware
end
end
end
end
require 'rack_ip_restrictor/ip_group'
require 'rack_ip_restrictor/middleware'
require 'rack_ip_restrictor/config'
require 'rack_ip_restrictor/restriction'
Есть идеи, почему рельсы не могут найти Rack :: IpRestrictor?
Спасибо