similar to: How to handle exception that is generated in rack middleware before it reach rails app?

Displaying 20 results from an estimated 400 matches similar to: "How to handle exception that is generated in rack middleware before it reach rails app?"

2014 Mar 27
0
Rack middleware for shared connection pools?
I have a Rails app that makes connections to other DBs. There may be multiple users connecting to multiple DBs. The app makes a database connection as part of an action. However, I noticed a problem: there's too many DB connections remaining open, which is causing the DB to not have enough connections remaining for new connections. So the answer is using a shared connection pool.
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
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 Railscast by
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 attachment was scrubbed...
2011 Aug 12
16
Rack content-length Rack::Lint::LintErrors errors with unicorn
Has anyone seen anything like this before? I can get it to happen all the time if I issue a HEAD request, but it only happens very intermittently on GET requests. I''m using Ruby 1.9.2p180. Any ideas on where to start debugging? 204.93.223.151, 10.195.114.81 - - [11/Aug/2011 21:03:50] "GET / HTTP/1.0" 200 37902 0.5316 app error: Content-Length header was 37902, but should be
2010 Aug 09
0
Exceptions in functional tests (rescue_action_in_public! broken?)
In 2.3, exceptions raised by controllers under functional tests were by default propagated to the test, but by using rescue_action_in_public! a test could trigger the production, public behavior and then use assert_response or similar to test the expected result. This was implemented via coordination between ActionController::Rescue and ActionController::TestCase::RaiseActionExceptions. This
2011 Mar 16
1
Help overriding rescue_action_in_public in Rails 3
In Rails 2.3.x, you can override render_optional_error_file like so: # ApplicationController.rb protected def render_optional_error_file(status_code) render :template => "errors/500", :status => 500, :layout => ''application'' end However, Rails 3 no longer has render_optional_error_file. Instead, you need to overriderescue_action_in_public, which I do:
2008 May 21
32
Rack, Camping 2.0++
=== 1. Camping on Rack === I''ve just finished rewriting Camping to use Rack in the "core". I got rid of (a little less) than 1kB in camping.rb and removed lots of un-necessary files (lib/server/*.rb, fastcgi.rb & mongrel.rb). bin/camping does now only provide WEBrick, Mongrel and console-support and should only be used in development. It uses Rack::ShowExceptions to catch
2010 Dec 15
2
Error reverse engineering MySQL with RMRE
Hi I am been trying in vain to auto-gen models by reverse-engineering mysql using RMRE. It complains mysql2 gem missing but as seen in my Rails environment below, it is there. Here''s my Rails environment and RMRE error. Experts... please help! Thanks a ton in advance!! === Ruby version 1.9.2 (x86_64-linux) RubyGems version 1.3.7 Rack version 1.2 Rails version 3.0.3 Active Record
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
2011 Jan 24
0
actionpack-3.0.3/lib/action_dispatch/middleware/rescue.rb
I was trying to understand how exceptions are caught. There are two rescue.rb files. One is under ActionController. I understand how it is invoked and what it does. But the one under action_dispatch I don''t see how it gets used. I see the autoload for it in actionpack-3.0.3/lib/action_dispatch.rb but I don''t see a Rescue class created anywhere. Can someone help me to
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 the following into the gem''s
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: ## in \lib\response_timer.rb ## this is the class of my custom middleware: class
2011 Jan 10
0
Can't use ActionDispatch::Request in Rails middleware because path_parameters get lost
Hi, I just encountered a bit of an issue where we call request.params of an ActionDispatch::Request inside a rack middleware right before a Rails 3.0.3 app. The issue is that the path_parameters never appear in the parameters hash if you call request.params before the rails app. It seems that that the requests.params method memoizes itself in "action_dispatch.request.parameters"
2009 Sep 30
0
MOM - Message Oriented Middleware for Rails
I would like to develop a monitoring system with Ruby and Rails. I will have the agents in the server and the monitoring system, with a poller that will notify the Rails application. I have tested ActiveMQ, with JRuby and Ruby and works fine. I will test the ActiveMessage plugin for an Rails easy integration. I wondering what are the more popular and reliable choices on Rails for MOM. I saw that
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
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
2013 Aug 12
2
Passenger-Rack error 500: no such file to load -- rack
I have a puppetmaster running within passenger+rack. It has been running properly for almost a year and decided to stop working on the weekend. Now I''m getting the Purple "Ruby (Rack) application could not be started" screen with Error: no such file to load -- rack Application: /data1/rack/puppetmaster The backtrace is uninspiring. Snippets include:
2012 Oct 18
4
Rack env rack.multiprocess true with single worker
Hi, unicorn unconditionally sets rack.multiprocess to true in the Rack environment. The Rack spec [0] says the following about the variable: "true if an equivalent application object may be simultaneously invoked by another process, false otherwise." When unicorn is running with a single worker this does not hold so what do you think about setting the variable to false when only a
2009 Mar 29
5
Rack::Lint::LintError with latest camping and rack
I''m trying to use Camping from Magnus'' repo (1.9.300) but running the blog.rb example (or anything for that matter) gives me Rack::Lint::LintError at / Content-Length header was 0, but should be 548 Ruby C:/ruby-1.8.7/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/lint.rb: in assert, line 16 Web GET localhost/ There are no errors on the camping output so I suspect something has