<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -688,13 +688,17 @@ Run `rake gems:install` to install the missing gems.
     # You can add gems with the #gem method.
     attr_accessor :gems
 
-    # Adds a single Gem dependency to the rails application.
+    # Adds a single Gem dependency to the rails application. By default, it will require
+    # the library with the same name as the gem. Use :lib to specify a different name.
     #
     #   # gem 'aws-s3', '&gt;= 0.4.0'
     #   # require 'aws/s3'
     #   config.gem 'aws-s3', :lib =&gt; 'aws/s3', :version =&gt; '&gt;= 0.4.0', \
     #     :source =&gt; &quot;http://code.whytheluckystiff.net&quot;
     #
+    # To require a library be installed, but not attempt to load it, pass :lib =&gt; false
+    #
+    #   config.gem 'qrp', :version =&gt; '0.4.1', :lib =&gt; false
     def gem(name, options = {})
       @gems &lt;&lt; Rails::GemDependency.new(name, options)
     end</diff>
      <filename>railties/lib/initializer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -58,7 +58,7 @@ module Rails
 
     def load
       return if @loaded || @load_paths_added == false
-      require(@lib || @name)
+      require(@lib || @name) unless @lib == false
       @loaded = true
     rescue LoadError
       puts $!.to_s</diff>
      <filename>railties/lib/rails/gem_dependency.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,6 +11,7 @@ uses_mocha &quot;Plugin Tests&quot; do
       @gem_with_source  = Rails::GemDependency.new &quot;hpricot&quot;, :source =&gt; &quot;http://code.whytheluckystiff.net&quot;
       @gem_with_version = Rails::GemDependency.new &quot;hpricot&quot;, :version =&gt; &quot;= 0.6&quot;
       @gem_with_lib     = Rails::GemDependency.new &quot;aws-s3&quot;, :lib =&gt; &quot;aws/s3&quot;
+      @gem_without_load  = Rails::GemDependency.new &quot;hpricot&quot;, :lib =&gt; false
     end
 
     def test_configuration_adds_gem_dependency
@@ -62,5 +63,13 @@ uses_mocha &quot;Plugin Tests&quot; do
       @gem_with_lib.add_load_paths
       @gem_with_lib.load
     end
+
+    def test_gem_without_lib_loading
+      @gem_without_load.expects(:gem).with(@gem_without_load.name)
+      @gem_without_load.expects(:require).with(@gem_without_load.lib).never
+      @gem_without_load.add_load_paths
+      @gem_without_load.load
+    end
+
   end
 end</diff>
      <filename>railties/test/gem_dependency_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>82343859d568799a4151facbde1f8c711ecb7a3f</id>
    </parent>
  </parents>
  <author>
    <name>Ben Sandofsky</name>
    <email>sandofsky@gmail.com</email>
  </author>
  <url>http://github.com/rails/rails/commit/61842d97c5269af8a36a33115f50543a155f1608</url>
  <id>61842d97c5269af8a36a33115f50543a155f1608</id>
  <committed-date>2008-08-04T05:53:21-07:00</committed-date>
  <authored-date>2008-08-01T17:01:10-07:00</authored-date>
  <message>Make requiring gems optional.

Signed-off-by: Michael Koziarski &lt;michael@koziarski.com&gt;
[#743 state:resolved]</message>
  <tree>6b08b69619f1a0aa9a727a5dfaeaff1e1dead69f</tree>
  <committer>
    <name>Michael Koziarski</name>
    <email>michael@koziarski.com</email>
  </committer>
</commit>
