title: Gemfile and Bundler error in foreman when doing bundle install
body: <p>I'm trying to install <a href="https://github.com/domcleal/foreman_hooks" rel="nofollow">foreman hooks</a> but I get <code>There was an error in your Gemfile, and Bundler cannot continue.</code> when running <code>bundle install</code></p>
  
  <p>foreman version 1.1</p>
  
  <pre><code>[root@foreman foreman]# bundle update
  /usr/share/foreman/config/settings.rb:2: undefined method `load_file' for YAML:Module (NoMethodError)
      /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
      /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
      /usr/share/foreman/Gemfile:1:in `eval_gemfile'
      /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/dsl.rb:9:in `evaluate'
      /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/definition.rb:19:in `build'
      /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler.rb:148:in `definition'
      /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/cli.rb:301:in `update'
      /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/vendor/thor/task.rb:27:in `__send__'
      /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/vendor/thor/task.rb:27:in `run'
      /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
      /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/vendor/thor.rb:344:in `dispatch'
      /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/vendor/thor/base.rb:434:in `start'
      /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/bin/bundle:20
      /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/friendly_errors.rb:3:in `with_friendly_errors'
      /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/bin/bundle:20
      /usr/bin/bundle:19:in `load'
      /usr/bin/bundle:19
  There was an error in your Gemfile, and Bundler cannot continue.
  </code></pre>
  
  <p>Gemfile:</p>
  
  <pre><code>[root@foreman foreman]# cat Gemfile
  require File.expand_path('../config/settings', __FILE__)
  source 'http://rubygems.org'
  
  gem 'rails'
  gem "jquery-rails"
  gem 'json'
  gem 'rest-client'
  gem "audited-activerecord"
  gem "will_paginate"
  gem "ancestry"
  gem 'scoped_search'
  gem 'net-ldap'
  gem "safemode"
  gem 'ruby_parser'
  gem 'uuidtools'
  gem "apipie-rails"
  gem 'rabl'
  gem 'oauth'
  
  Dir["#{File.dirname(__FILE__)}/bundler.d/*.rb"].each do |bundle|
   # puts "adding custom gem file #{bundle}"
    self.instance_eval(Bundler.read_file(bundle))
  end
  </code></pre>
  
  <p>And Gemlock.file</p>
  
  <pre><code>[root@foreman foreman]# cat Gemfile.lock 
  GEM
    remote: http://rubygems.org/
    specs:
      abstract (1.0.0)
      actionmailer (3.0.20)
        actionpack (= 3.0.20)
        mail (~&gt; 2.3.0)
      actionpack (3.0.20)
        activemodel (= 3.0.20)
        activesupport (= 3.0.20)
        builder (~&gt; 2.1.2)
        erubis (~&gt; 2.6.6)
        i18n (~&gt; 0.5.0)
        rack (~&gt; 1.2.5)
        rack-mount (~&gt; 0.6.14)
        rack-test (~&gt; 0.5.7)
        tzinfo (~&gt; 0.3.23)
      activemodel (3.0.20)
        activesupport (= 3.0.20)
        builder (~&gt; 2.1.2)
        i18n (~&gt; 0.5.0)
      activerecord (3.0.20)
        activemodel (= 3.0.20)
        activesupport (= 3.0.20)
        arel (~&gt; 2.0.10)
        tzinfo (~&gt; 0.3.23)
      activeresource (3.0.20)
        activemodel (= 3.0.20)
        activesupport (= 3.0.20)
      activesupport (3.0.20)
      ancestry (1.3.0)
        activerecord (&gt;= 2.3.14)
      apipie-rails (0.0.13)
      arel (2.0.10)
      audited (3.0.0.rc1)
      audited-activerecord (3.0.0.rc1)
        activerecord (~&gt; 3.0)
        audited (= 3.0.0.rc1)
      builder (2.1.2)
      erubis (2.6.6)
        abstract (&gt;= 1.0.0)
      excon (0.14.0)
      fog (1.9.0)
        builder
        excon (~&gt; 0.14)
        formatador (~&gt; 0.2.0)
        mime-types
        multi_json (~&gt; 1.0)
        net-scp (~&gt; 1.0.4)
        net-ssh (&gt;= 2.1.3)
        nokogiri (~&gt; 1.5.0)
        ruby-hmac
      foreman_hooks (0.3.1)
      formatador (0.2.1)
      i18n (0.5.0)
      jquery-rails (1.0.19)
        railties (~&gt; 3.0)
        thor (~&gt; 0.14)
      json (1.6.8)
      mail (2.3.3)
        i18n (&gt;= 0.4.0)
        mime-types (~&gt; 1.16)
        treetop (~&gt; 1.4.8)
      mime-types (1.18)
      multi_json (1.2.0)
      net-ldap (0.3.1)
      net-scp (1.0.4)
        net-ssh (&gt;= 1.99.1)
      net-ssh (2.3.0)
      nokogiri (1.5.2)
      oauth (0.4.7)
      polyglot (0.3.3)
      rabl (0.7.5)
        activesupport (&gt;= 2.3.14)
        multi_json (~&gt; 1.0)
      rack (1.2.5)
      rack-mount (0.6.14)
        rack (&gt;= 1.0.0)
      rack-test (0.5.7)
        rack (&gt;= 1.0)
      rails (3.0.20)
        actionmailer (= 3.0.20)
        actionpack (= 3.0.20)
        activerecord (= 3.0.20)
        activeresource (= 3.0.20)
        activesupport (= 3.0.20)
        bundler (~&gt; 1.0)
        railties (= 3.0.20)
      railties (3.0.20)
        actionpack (= 3.0.20)
        activesupport (= 3.0.20)
        rake (&gt;= 0.8.7)
        rdoc (~&gt; 3.4)
        thor (~&gt; 0.14.4)
      rake (0.9.2.2)
      rbvmomi (1.5.1)
        builder
        nokogiri (&gt;= 1.4.1)
        trollop
      rdoc (3.12)
        json (~&gt; 1.4)
      rest-client (1.6.7)
        mime-types (&gt;= 1.16)
      ruby-hmac (0.4.0)
      ruby-libvirt (0.4.0)
      ruby2ruby (2.0.1)
        ruby_parser (~&gt; 3.0.0)
        sexp_processor (~&gt; 4.0)
      ruby_parser (3.0.1)
        sexp_processor (~&gt; 4.1)
      safemode (1.2.0)
        ruby2ruby (&gt;= 2.0.1)
        ruby_parser (&gt;= 3.0.1)
        sexp_processor (&gt;= 4.1.2)
      scoped_search (2.4.0)
        activerecord (&gt;= 2.1.0)
      sexp_processor (4.1.2)
      sqlite3 (1.3.5)
      thor (0.14.6)
      treetop (1.4.10)
        polyglot
        polyglot (&gt;= 0.3.1)
      trollop (1.16.2)
      tzinfo (0.3.32)
      uuidtools (2.1.1)
      will_paginate (3.0.3)
  
  PLATFORMS
    ruby
  
  DEPENDENCIES
    ancestry
    apipie-rails
    audited-activerecord
    fog (&gt;= 1.9)
    foreman_hooks
    jquery-rails
    json
    net-ldap
    oauth
    rabl
    rails
    rbvmomi
    rest-client
    ruby-libvirt
    ruby_parser
    safemode
    scoped_search
    sqlite3
    uuidtools
    will_paginate
  </code></pre>