title: How to require ActiveRecord In IRB
body: <p>I would like to load the ActiveRecord gem in my IRB session, but the following is not working:</p>
  
  <pre><code>require 'activerecord'
  2.4.1 :004 &gt; require 'activerecord'
  LoadError: cannot load such file -- activerecord
      from /Users/robskrob/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from /Users/robskrob/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from (irb):4
      from /Users/robskrob/.rvm/rubies/ruby-2.4.1/bin/irb:11:in `&lt;main&gt;'
  </code></pre>
  
  <p>and Neither is this one:</p>
  
  <pre><code>2.4.1 :018 &gt; require 'activerecord-5.1.2'
  LoadError: cannot load such file -- activerecord-5.1.2
      from /Users/robskrob/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:120:in `require'
      from /Users/robskrob/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:120:in `require'
      from (irb):18
      from /Users/robskrob/.rvm/rubies/ruby-2.4.1/bin/irb:11:in `&lt;main&gt;'
  </code></pre>
  
  <p>This is my Gem path in irb:</p>
  
  <pre><code>        2.4.1 :012 &gt; Gem.path
       =&gt; [
            "/Users/robskrob/.rvm/gems/ruby-2.4.1", 
            "/Users/robskrob/.rvm/gems/ruby-2.4.1@global
          ]
  </code></pre>
  
  <p>and here are my active record gems:</p>
  
  <pre><code>ls /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/activere
  activerecord-4.2.10/   activerecord-5.1.2/    activerecord-5.1.4/    activerecord-5.1.6/
  activerecord-5.0.0.1/  activerecord-5.1.3/    activerecord-5.1.5/    activeresource-5.0.0/
  </code></pre>
  
  <p>How do I load one of those ActiveRecord gems into my IRB session?</p>
  
  <p>I have looked at <a href="https://stackoverflow.com/questions/39694428/requiring-activerecord-on-irb-ruby-no-rails?utm_medium=organic&amp;utm_source=google_rich_qa&amp;utm_campaign=google_rich_qa">this post</a> and <a href="https://stackoverflow.com/questions/4115653/gem-loads-in-irb-but-not-console?utm_medium=organic&amp;utm_source=google_rich_qa&amp;utm_campaign=google_rich_qa">this post</a>, but I could not source a solution from either the questions or the answers.</p>