axsuul / rails-reverse-proxy

A reverse proxy for Ruby on Rails
MIT License
241 stars 61 forks source link

NameError - undefined local variable or method `cookies' #13

Closed bapirex closed 8 years ago

bapirex commented 8 years ago

This old beast surfaces again. I guess in my earlier testing the thing I was proxying didn't make use of cookies and now it does. Got any ideas on why this is happening?

Relevant BT:

/var/www/app/vendor/bundle/ruby/2.1.0/gems/rails-reverse-proxy-0.6.0/lib/reverse_proxy/controller.rb:25:in `block (3 levels) in reverse_proxy'
E, [2016-10-19T23:21:23.014428 #10371] ERROR -- : => /var/www/app/vendor/bundle/ruby/2.1.0/gems/rails-reverse-proxy-0.6.0/lib/reverse_proxy/controller.rb:24:in `each'
E, [2016-10-19T23:21:23.014477 #10371] ERROR -- : => /var/www/app/vendor/bundle/ruby/2.1.0/gems/rails-reverse-proxy-0.6.0/lib/reverse_proxy/controller.rb:24:in `block (2 levels) in reverse_proxy'
E, [2016-10-19T23:21:23.014511 #10371] ERROR -- : => /var/www/app/vendor/bundle/ruby/2.1.0/gems/rails-reverse-proxy-0.6.0/lib/reverse_proxy/client.rb:100:in `call'
E, [2016-10-19T23:21:23.014544 #10371] ERROR -- : => /var/www/app/vendor/bundle/ruby/2.1.0/gems/rails-reverse-proxy-0.6.0/lib/reverse_proxy/client.rb:100:in `request'
E, [2016-10-19T23:21:23.014594 #10371] ERROR -- : => /var/www/app/vendor/bundle/ruby/2.1.0/gems/rails-reverse-proxy-0.6.0/lib/reverse_proxy/controller.rb:59:in `reverse_proxy'
axsuul commented 8 years ago

Can I see the code where you're using this? It sounds like you're not calling this from a controller.

axsuul commented 8 years ago

Any updates on this?

bapirex commented 8 years ago

@axsuul Sorry about the late response, I am calling it from a controller, but I cannot seem to reproduce it. If I do, I will open another issue, I think it's best if I close this one for now. Sorry about the confusion.