make loading full rubygems optional

Situation:

Currently rails 2.3.8 and 3.0 all force a full loading of full rubygems.

Unfortunately this adds an extra 10MB of RSS to the application, making servers slower because of GC. Typically one wants the convenience of full rubygems, but not always.

Suggestion: only lazy load full rubygems, like if someone does

config.gem 'gem_name' # load full rubygems at this point

This would allow users to avoid loading full rubygems where desired, which currently isn't possible [1].

Thoughts? -r [1] ANN: zozo 1.0.0 Released - Ruby - Ruby-Forum

Could you explain how?

Situation:

Currently rails 2.3.8 and 3.0 all force a full loading of full

rubygems.

Could you explain how?

I am not really sure about this. But, Bundler can be used in this situation, isn’t it?

Anuj

> Currently rails 2.3.8 and 3.0 all force a full loading of full > rubygems.

Could you explain how?

If I remember correctly, bundler does something like

Gem::Dependency # force loading of full rubygems

Though I should look more closely at that one, since I was also under the assumption that you could use "just" builder and not full rubygems, so I'm not sure why it does that, or if it's currently necessary.

2.3.8 requires a full load for doing its config.gem setup.

-r

Bundler does not currently support a mode of operation without Rubygems, but we plan to add such a mode in 1.1.

Yehuda Katz Architect | Engine Yard (ph) 718.877.1325