Martin Ennemoser wrote in post #1154169:
> I have a ruby script which instruments Net::HTTP requests in Rails
> applications. This works as follows: When Ruby loads the Net::HTTP
> class, I
> alias the request method. At every http request, my instrumented method
> gets executed. So that this works, I need to execute my script BEFORE
> ruby
> loads the standard library and BEFORE Rails gets loaded. So I need the
> earliest possible point in Rails where I can require my instrumentation
> script.
Sound to me like you need to make your own Rack middleware and insert it
into the stack in the appropriate place.
http://guides.rubyonrails.org/rails_on_rack.html
--
Posted via
http://www.ruby-forum.com/.