title: Getting an error when trying to require active_record
body: <p>In my Gemfile I have:</p>
  
  <pre><code>source 'https://rubygems.org'
  
  gem 'pry'
  gem 'pg'
  gem 'activerecord'
  </code></pre>
  
  <p>In my app.rb file I have: </p>
  
  <pre><code>require 'active_record'
  require 'pg'
  require 'pry'
  
  
  
  ActiveRecord::Base.establish_connection(
      database: 'hospital_db',
      adapter: 'postgresql'
  )
  
  class Doctor &lt; ActiveRecord::Base
    has_many :appointments, :skills
    has_many :patients, through: :appointments
  end
  
  class Patient &lt; ActiveRecord::Base
    has_many :appointments
    has_many :doctors, through: :appointments
  end
  
  class Appointment &lt; ActiveRecord::Base
    belongs_to :patient
    belongs_to :doctor
  end
  
  class Skill &lt; ActiveRecord::Base
    belongs_to :doctor
  end
  
  binding.pry
  </code></pre>
  
  <p>As soon as I type <code>ruby app.rb</code> in my terminal I get the following errors:</p>
  
  <pre><code>/Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::BASE
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of BASE was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::EXCEPTION_ALL
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of EXCEPTION_ALL was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::EXCEPTION_NaN
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of EXCEPTION_NaN was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::EXCEPTION_INFINITY
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of EXCEPTION_INFINITY was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::EXCEPTION_UNDERFLOW
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of EXCEPTION_UNDERFLOW was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::EXCEPTION_OVERFLOW
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of EXCEPTION_OVERFLOW was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::EXCEPTION_ZERODIVIDE
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of EXCEPTION_ZERODIVIDE was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_MODE
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of ROUND_MODE was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_UP
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of ROUND_UP was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_DOWN
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of ROUND_DOWN was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_HALF_UP
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of ROUND_HALF_UP was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_HALF_DOWN
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of ROUND_HALF_DOWN was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_CEILING
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of ROUND_CEILING was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_FLOOR
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of ROUND_FLOOR was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_HALF_EVEN
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of ROUND_HALF_EVEN was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_NaN
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of SIGN_NaN was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_POSITIVE_ZERO
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of SIGN_POSITIVE_ZERO was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_NEGATIVE_ZERO
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of SIGN_NEGATIVE_ZERO was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_POSITIVE_FINITE
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of SIGN_POSITIVE_FINITE was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_NEGATIVE_FINITE
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of SIGN_NEGATIVE_FINITE was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_POSITIVE_INFINITE
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of SIGN_POSITIVE_INFINITE was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_NEGATIVE_INFINITE
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of SIGN_NEGATIVE_INFINITE was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::INFINITY
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of INFINITY was here
  /Users/andrewkim/.rvm/gems/ruby-2.1.5@global/extensions/x86_64-darwin-14/2.1.0-static/bigdecimal-1.2.5/bigdecimal.bundle: warning: already initialized constant BigDecimal::NAN
  /Users/andrewkim/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of NAN was here
  WARN: Unresolved specs during Gem::Specification.reset:
        json (&gt;= 1.7.7, ~&gt; 1.7)
        minitest (~&gt; 5.1)
  WARN: Clearing out unresolved specs.
  Please report a bug if this causes problems.
  /Users/andrewkim/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/associations/builder/association.rb:64:in `initialize': undefined method `arity' for :skills:Symbol (NoMethodError)
      from /Users/andrewkim/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/associations/builder/collection_association.rb:18:in `initialize'
      from /Users/andrewkim/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/associations/builder/association.rb:47:in `new'
      from /Users/andrewkim/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/associations/builder/association.rb:47:in `create_builder'
      from /Users/andrewkim/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/associations/builder/association.rb:35:in `build'
      from /Users/andrewkim/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/associations.rb:1259:in `has_many'
      from app.rb:13:in `&lt;class:Doctor&gt;'
      from app.rb:12:in `&lt;main&gt;'
  </code></pre>
  
  <p>I imagine it's something simple, but I've tried bundle install again, and I can't figure out why its trying to override BigDecimal Constant or how I can fix it. I tried requiring <code>activerecord</code> and <code>active-record</code> but they give an easy <code>cannot load such file</code> error. So <code>require active_record</code> has got to be the right one. Any thoughts or suggestions? </p>