voltrb - Error: "uninitialized constant Object::Rack" when using gem rack-throttle in ruby Volt framework -


i trying throttle malicious website using rack-throttle in new volt framework. here code in compnent/config/initializers/boot.rb file:

volt.current_app.middleware.use(rack::throttle::minute, max: 60) 

limiting requests per minute works correctly, getting error message says following:

uncaught nameerror: uninitialized constant object::rack 

any appreciated.

did require 'rack/throttle' first?

also, middleware, want sure running on server:

unless ruby_platform == 'opal'   volt.current_app.middleware.use(rack::throttle::minute, max: 60) end 

Comments