Img source: blog.honeybadger.io

Rails gives you a lot of great ways for rapid development, but there comes a time when your application is already mature and needs to be optimized, because it has become slow. The more gems you add to it, the slower it tends to get. Each gem you add in your project will increase the level of RAM this app consumes. Here is a gem called derailed that can help you learn about other gems, developed by Richard Schneeman.

You can install it as any other gem:

gem ‘derailed’, group: :development

If you also want to get all other profiling tools, add the following gem as well:

gem “stackprof”, group: :development

Then you can see exactly how much memory each of your gems requires at compile time.

Derailed can give information about your project by sending requests against your web app and benchmarking it, or it can also learn from the dependencies that are in your Gemfile. You can learn a lot more about it by reading its README on Github.