search for: middlewar

Displaying 20 results from an estimated 360 matches for "middlewar".

Did you mean: middleware
2013 May 13
0
Middleware example from Railscast #151 doesn't work as expected. Need help.
My middleware class "ResponseTimer" doesn''t intercept a request. I don''t know why (the example is from here http://railscasts.com/episodes/151-rack-middleware?view=asciicast; I changed my one a little for Rails 3.2.13 version, the original is for Rails 2.x). So I did as follows: ##...
2011 Jun 03
0
Rack Middleware support for Rails 2.0.2? If not what is the alternative to implement similar functionality in Rails 2.0.2..
Hello all, I am using Rails 2.0.2 and Ruby 1.8.7 and I need to make use of rack middleware for integrating an ajax file upload plugin(https:// github.com/valums/file-uploader) with paperclip in Rails( As given in this tutorial:- http://mooooooooooo.wordpress.com/2010/12/03/paperclip-valums%E2%80%99s-file-uploader-and-middleware-continued/). I have referred to the rack-middleware Railsc...
2009 Sep 22
4
rspec-rails and rack middleware
It doesn''t seem like my controller specs are calling my middleware on requests. Has anyone figured out a good way to test middlware with rspec? I''m thinking something like rails'' rails/actionpack/test/controller/session/mem_cache_store_test.rb but with rspec... any thoughts? Thanks! Best, Aaron -------------- next part -------------- An HTML at...
2012 Jan 12
0
telling app to use middleware in gem
I have a gem, and part of the gem is a piece of rack middleware. In Rails 2.3, I could make the gem set up the middleware without adding anything to config/*.rb in the app. I did this with the following line: ActionController::Dispatcher.middleware.use ''MyMiddleware'' But in Rails 3, this doesn''t work. I''ve tried putting t...
2010 Dec 10
0
Encoding issues when uploading files
...`optimized_each'' rack-mount (0.6.13) lib/rack/mount/code_generation.rb:92:in `recognize'' rack-mount (0.6.13) lib/rack/mount/route_set.rb:139:in `call'' actionpack (3.0.0) lib/action_dispatch/routing/route_set.rb:492:in `call'' actionpack (3.0.0) lib/action_dispatch/middleware/ best_standards_support.rb:17:in `call'' actionpack (3.0.0) lib/action_dispatch/middleware/head.rb:14:in `call'' rack (1.2.1) lib/rack/methodoverride.rb:24:in `call'' actionpack (3.0.0) lib/action_dispatch/middleware/params_parser.rb: 21:in `call'' actionpack (3.0.0...
2012 Jul 23
4
uninitialized constant ActionController::Flash::FlashHash [NameError])
...SessionRestoreError (Session contains objects whose class definition isn''t available. Remember to require the classes for all objects kept in the session. (Original exception: uninitialized constant ActionController::Flash::FlashHash [NameError]) ): actionpack (3.2.1) lib/action_dispatch/middleware/session/abstract_store.rb:62:in `rescue in rescue in stale_session_check!'' actionpack (3.2.1) lib/action_dispatch/middleware/session/abstract_store.rb:58:in `rescue in stale_session_check!'' actionpack (3.2.1) lib/action_dispatch/middleware/session/abstract_store.rb:55:in `sta...
2012 May 31
1
Rack Middleware or after filter
Hi All I need an solution that i should catch response and based on some conditions i have to modify response body and send back to client. I have tried with a Middleware and got a solution.Can i use a Middleware or simply one after_filter. On performance wise which is best.Or is there any other ways to do it. thanks in advance. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"...
2011 May 21
4
request.format = :mobile causes error "undefined method `ref' for nil:NilClass"
...`optimized_each'' rack-mount (0.6.14) lib/rack/mount/code_generation.rb:92:in `recognize'' rack-mount (0.6.14) lib/rack/mount/route_set.rb:139:in `call'' actionpack (3.0.7) lib/action_dispatch/routing/route_set.rb:493:in `call'' actionpack (3.0.7) lib/action_dispatch/middleware/ best_standards_support.rb:17:in `call'' actionpack (3.0.7) lib/action_dispatch/middleware/head.rb:14:in `call'' rack (1.2.2) lib/rack/methodoverride.rb:24:in `call'' actionpack (3.0.7) lib/action_dispatch/middleware/params_parser.rb: 21:in `call'' actionpack (3.0.7...
2010 Jul 26
2
Exception Pages when behind a proxy
I am not sure if this desired feature or not but when we are behind a local proxy ie. Nginx/Varnish then the new ShowException middleware doesn''t seem to properly detect the remote IP address and it appears as if every browser gets a local error page with a stack trace, etc. I''ve opened up a ticket on the rails bug tracker but I also would like to verify that this is in fact a problem. The bug is here: https://ra...
2010 Aug 18
6
undefined method `eq' for nil:NilClass
I''m walking through an example in the "Head First Rails" book, but, instead doing the examples using Rails3.0.0.rc. But, I''m getting this error when browsing for example: http://localhost:3000/advs/1 undefined method `eq'' for nil:NilClass Provided that my advs_controller.rb is as follows: http://pastie.org/private/cd9zntg2ite57ept288kfa Any ideas why
2013 Jan 29
2
unicorn 4.6.0pre1 - hijacking support!
...01 From: Eric Wong <normalperson at yhbt.net> Date: Tue, 29 Jan 2013 21:02:55 +0000 Subject: [PATCH] unicorn 4.6.0pre1 - hijacking support This pre-release adds hijacking support for Rack 1.5 users. See Rack documentation for more information about hijacking. There is also a new --no-default-middleware/-N option for the `unicorn'' command to ignore RACK_ENV within unicorn. --- GIT-VERSION-GEN | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 365df8d..46ef417 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/b...
2012 Apr 24
1
Rails 3 Errno::EAFNOSUPPORT: Address family not supported by protocol - socket(2)
...GEM_ROOT]/gems/journey-1.0.3/lib/journey/router.rb:56:in `each'' [GEM_ROOT]/gems/journey-1.0.3/lib/journey/router.rb:56:in `call'' [GEM_ROOT]/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:600:in `call'' [GEM_ROOT]/gems/actionpack-3.2.3/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'' [GEM_ROOT]/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call'' [GEM_ROOT]/gems/rack-1.4.1/lib/rack/conditionalget.rb:35:in `call'' [GEM_ROOT]/gems/actionpack-3.2.3/lib/action_dispatch/middleware/head.rb:14:in `call'' [GEM_ROOT]...
2012 Apr 24
1
Rails 3 Errno::EAFNOSUPPORT: Address family not supported by protocol - socket(2)
...GEM_ROOT]/gems/journey-1.0.3/lib/journey/router.rb:56:in `each'' [GEM_ROOT]/gems/journey-1.0.3/lib/journey/router.rb:56:in `call'' [GEM_ROOT]/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:600:in `call'' [GEM_ROOT]/gems/actionpack-3.2.3/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'' [GEM_ROOT]/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call'' [GEM_ROOT]/gems/rack-1.4.1/lib/rack/conditionalget.rb:35:in `call'' [GEM_ROOT]/gems/actionpack-3.2.3/lib/action_dispatch/middleware/head.rb:14:in `call'' [GEM_ROOT]...
2012 Oct 02
4
Rails Default ETag Generation
How does Rails generate ETags by default? I''ve got config.action_controller. perform_caching set to true in production so that I can use page-level caching in a few specific places, but it seems that Rails is automatically setting ETags on *all* responses even though I''m not using fresh_when or the stale? helpers in any of my actions. How is Rails deciding to do this and how
2012 Sep 04
2
How to get contact list from yahoo in rails using OAuth
I can successfully get the contacts from google using OAuth gem in rails. my gmail configuration is : :google=>{ :key=>"***", :secret=>"***", :expose => true, :scope=>"https://www.google.com/m8/feeds/" } now i want to get contact from yahoo and hot mail. How to get that contact I have given following configuration in my
2011 Apr 20
1
Omniauth facebook authentication failure
...**** What am i doing wrong? -------------- Routes.rb -------------- get "/auth/:provider/callback" => "authentications#create" ---------------------------------------- In my config/initializers/omniauth.rb ----------------------------------------- Rails.application.config.middleware.use OmniAuth::Builder do provider :twitter, ''xxxx'', ''xxxx'' provider :facebook, ''appid'', ''appsecret'', {:scope=>''publish_stream,email''} end ------------------------------------- In my authentications co...
2011 Aug 07
9
How can I disable Rails 3.1's ActiveRecord Query Caching?
Hey guys, As most of you know, Rails 3.1 introduces query caching for ActiveRecord. Great change all-in-all, but for those of us with IT department mandates for using MySQL (yeah, yeah, I know...), it''s kind of a mixed bag. I need to disable query caching in a project I''m building based on 3.1. I''ve tried a couple different approaches, both without any success. I
2023 Jul 02
0
[Bug 3585] New: "misc.h" required when build the sk middleware ("sk-usbhid.c") as standalone library
https://bugzilla.mindrot.org/show_bug.cgi?id=3585 Bug ID: 3585 Summary: "misc.h" required when build the sk middleware ("sk-usbhid.c") as standalone library Product: Portable OpenSSH Version: 9.3p1 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 Component: Miscellaneous...
2013 Apr 06
0
Bug#693137: marked as done (ITP: swift-plugin-s3 -- swift3 (S3 compatibility) middleware plugin for swift)
Your message dated Sat, 06 Apr 2013 13:00:07 +0000 with message-id <E1UOSj1-0002As-63 at franck.debian.org> and subject line Bug#693137: fixed in swift-plugin-s3 1.7-1 has caused the Debian Bug report #693137, regarding ITP: swift-plugin-s3 -- swift3 (S3 compatibility) middleware plugin for swift to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this...
2013 Jul 22
0
How to handle exception that is generated in rack middleware before it reach rails app?
I know that we can use config.exception_app to set up custom exception handling and also use rescue_from. However, I have an issue that there is malformed request (testing generated request) that caused Rails Rack middleware to throw an exception when Rack''s parse_query method. Here is the detail of the problem: http://stackoverflow.com/questions/17796878/how-to-handle-exception-generated-from-rack-before-reaching-your-rails-app The issue is that it failed in rails Rack::MethodOverride with is before Act...