refraction icon indicating copy to clipboard operation
refraction copied to clipboard

Possible problem in config.middleware.insert_before line

Open mhartl opened this issue 15 years ago • 3 comments

Refraction rocks. I just had one small problem setting it up. Using

config.middleware.insert_before(::Rack::Lock, ::Refraction, {})

in production.rb gives me the error

gems/refraction-0.2.0/lib/refraction.rb:98:in `initialize':
wrong number of arguments (2 for 1) (ArgumentError)

(I'm running Rails 3.0.0.beta4.)

I removed the third argument and it worked:

config.middleware.insert_before(::Rack::Lock, ::Refraction)

mhartl avatar Jul 01 '10 23:07 mhartl

Had the same problem with Rails 3.0.5. Did the same suggested fix as mhartl and now it works fine, fwiw.

neezer avatar Mar 08 '11 20:03 neezer

I got same issue on heroku. But it works with webrick.

ulmen avatar Mar 09 '11 16:03 ulmen

Happened to me also. Removed third argument and works now.

meal avatar Jun 26 '13 09:06 meal