How to use Miniprofiler for rails rails2 app?


#1

Already I’m very like your open source (Miniprofiler) and I want to use it in my rails 2.x app. However, it’s not support. How to use in rails 2? can you support me to do manual because I’ve looked url https://github.com/SamSaffron/MiniProfiler/blob/master/Ruby/lib/mini_profiler_rails/railtie.rb but don’t clean to hook it up manually.

Thanks,
Chon


#2

Have you tried running the following in either your environment.rb config block or an intializer:

config.middleware.insert(0, Rack::MiniProfiler)

You can pretty much lift the whole railtie in


#3

Sam, I was trying to add config.middleware.insert(0, Rack::MiniProfiler) to environment.rb and have a error `load_missing_constant’: uninitialized constant Rack::MiniProfiler (NameError) when start server

https://dl.dropbox.com/u/8811525/start_server.png
https://dl.dropbox.com/u/8811525/environment.png


#4

apologies will try to answer this tomorrow, in essence you hook it up in environment.rb or an initializer


#5

Sorry, I don’t understand “hook” so you can explain more …?


#6

did you include it in your Gemfile or require rack-mini-profiler in your environment


#7

Hi Sam, My problem has resolved but I have other problem that I went to all sites and mysql query not showing up


#8

that mean the SQL column is empty


#9

@sam I am trying to use it in Rails 2.3 but I am getting an error “undefined method `set_cookie_header!’ for Rack::Utils:Module” when I am trying to load the page,does it really work with Rails 2.x or shall I give up on that ?, I badly need this profiler for my project.Please suggest some workaround or any alternatives.

@domic Are you able to fix your issue and able to use it for Rails 2.x ?


#10

Really not sure what to do about Rails 2… have not used it in many years.