views:

17

answers:

1

because

gem 'gem_name'          # Rails 3.0

or

config.gem 'gem_name'   # Rails 2.x

will load the gem no matter what the controller is... will a

require 'gem_name' 

in the controller source code actually make the Rails server run faster because not every controller will load that gem?

+1  A: 

The short answer is: no.

Stick with keeping your code sane and maintainable by grouping your required gems in your Gemfile / environment.rb.

I would need to see some well crafted performance data before I'd believe that this would ever make a noticeable difference in a production environment. There are so many other places to optimize first.

jdl
I agree. This is especially true because your rails app will go ahead and load all controllers when it fires up anyway.
Jaime Bellmyer