diff --git a/Gemfile b/Gemfile index ce2c424d6..dd078eba8 100644 --- a/Gemfile +++ b/Gemfile @@ -126,6 +126,7 @@ group :development do gem 'localeapp' gem 'skype' #gem 'ruby-dbus' if RUBY_PLATFORM =~ /linux/i # Error at deploy + gem 'rack-mini-profiler', require: false end group :development, :test do diff --git a/Gemfile.lock b/Gemfile.lock index c85ad6e77..6f6e00ebb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -354,6 +354,8 @@ GEM rack (1.5.2) rack-contrib (1.2.0) rack (>= 0.9.1) + rack-mini-profiler (0.9.3) + rack (>= 1.1.3) rack-protection (1.5.3) rack rack-test (0.6.3) @@ -637,6 +639,7 @@ DEPENDENCIES protected_attributes puma pundit + rack-mini-profiler rack-throttle (~> 0.3.0) rack-utf8_sanitizer rails (= 4.1.10) diff --git a/config/initializers/rack_profiler.rb b/config/initializers/rack_profiler.rb new file mode 100644 index 000000000..2bb079c55 --- /dev/null +++ b/config/initializers/rack_profiler.rb @@ -0,0 +1,6 @@ +if Rails.env == 'development' + require 'rack-mini-profiler' + + # initialization is skipped so trigger it + Rack::MiniProfilerRails.initialize!(Rails.application) +end \ No newline at end of file