The best tool to find leaky gems in your dependencies. Make sure memory leaks are not in your gem dependencies.
Checks for memory leaks of gems in Gemfile.lock
Prints memory leak information
You can install it as a gem:
$ gem install bundler-leak
or add it into a Gemfile (Bundler):
1 2 3 4 5 6 7 8
# Put gems used only for development or testing in the appropriate group in the Gemfile group :developmentdo # rubymem/bundler-leak: Known-leaky gems verification for bundler: `bundle leak` to check your app and find leaky gems in your Gemfile # https://github.com/rubymem/bundler-leak gem 'bundler-leak', '0.2.0' end
Then, run bundle install.
$ bundle install
Audit a project’s Gemfile.lock:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
$ bundle leak
Name: celluloid Version: 0.17.0 URL: https://github.com/celluloid/celluloid/issues/670 Title: Memory Leak using Celluloid::Future Solution: remove or disable this gem until a patch is available!
Name: therubyracer Version: 0.12.1 URL: https://github.com/cowboyd/therubyracer/pull/336 Title: Memory leak in WeakValueMap Solution: upgrade to ~> 0.12.3