From 9b489506d09781373992b6b35aa8cefcb9e7538b Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Fri, 5 Jun 2015 01:03:11 +1000 Subject: [PATCH] update memory profiler, oj and lru redux --- Gemfile.lock | 6 +++--- config/initializers/06-mini_profiler.rb | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2b2f3aa8d62..ff5e238b0ff 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -148,11 +148,11 @@ GEM libv8 (3.16.14.7) listen (0.7.3) logster (0.8.1) - lru_redux (0.8.4) + lru_redux (1.1.0) mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) - memory_profiler (0.9.0) + memory_profiler (0.9.3) message_bus (1.0.12) rack (>= 1.1.3) redis @@ -182,7 +182,7 @@ GEM multi_json (~> 1.3) multi_xml (~> 0.5) rack (~> 1.2) - oj (2.12.0) + oj (2.12.9) omniauth (1.2.2) hashie (>= 1.2, < 4) rack (~> 1.0) diff --git a/config/initializers/06-mini_profiler.rb b/config/initializers/06-mini_profiler.rb index bd13624a609..5f7e017cb5c 100644 --- a/config/initializers/06-mini_profiler.rb +++ b/config/initializers/06-mini_profiler.rb @@ -3,8 +3,11 @@ if Rails.configuration.respond_to?(:load_mini_profiler) && Rails.configuration.l require 'rack-mini-profiler' require 'flamegraph' - # TODO support Ruby 2.2 once bundler fixes itself - require 'memory_profiler' if RUBY_VERSION >= "2.1.0" && RUBY_VERSION < "2.2.0" + begin + require 'memory_profiler' if RUBY_VERSION >= "2.1.0" + rescue => e + STDERR.put "#{e} failed to require mini profiler" + end # initialization is skipped so trigger it Rack::MiniProfilerRails.initialize!(Rails.application)