views:

321

answers:

2

When Rails loads, does it load all the gems that are installed on the system? I've got 47 gems installed on the server, including all the various Rails gems which have multiple versions. However, both Rails, and all the gems used by the application, are frozen into the application.

Are all those gems getting loaded, and would that cause the application to run slower or take up more memory (note I've got two instances of my application running on the server, one live and one as a test environment)? If Rails is loading all the installed gems, is there a way to make it just load frozen gems and no others?

+4  A: 

No, just those that you require or are required by Rails.

Justin
Adding how they are required (best practices) is probably a good idea.
Ryan Bigg
+2  A: 

Rails loads all installed plugins in the application but never the gems unless its explicitly mentioned (using require) in the application

Nayak