Rails: Do not load frameworks you don't need
Rails is split into a large number of (sub-) frameworks.
The most important and central of those are
- activesupport (extends the Ruby standard library)
- activerecord / activemodel (ORM for Rails)
- actionview / actionpack (controller / views)
- actionmailer (sends mails)
However, there are also some more situational frameworks included, such as
- actioncable (real time communications using websockets)
- actionmailbox (receives mails)
- actiontext (support for WYSIWYG text editor)
- activejob (background jobs)
- activestorage (file upload and storage)
- sprockets (the old "asset pipeline")
You might not need all of these frameworks in every app, so in the interest of startup time and memory usage, you can disable them. To do that, simply comment out the appropriate lines in
config/application.rb. You'll also have to remove some configuration options, but you'll receive appropriate error messages.
application.rb only has
require 'rails/all', you need to replace that line with individual requires for the frameworks you would like to keep.