title: Requiring a gem using internally a different name
body: <p>I wrote a small gem and I decided to use internally a different name than externally i.e. my gem's name is google-search, but the file structure is</p>
  
  <pre><code>google-search
    |-lib
      |-google
        |-search
        |-search.rb
  </code></pre>
  
  <p>to load my code using pry I simply do</p>
  
  <pre><code>bundle exec pry -r ./lib/google/search
  </code></pre>
  
  <p>from inside the google-search directory.</p>
  
  <p>I have now included my new gem in my project and I'm attempting to require and use it, but for some reasons I'm not able to do it.</p>
  
  <p>I've tried:</p>
  
  <pre><code>[1] pry(main)&gt; require 'google/search'
  =&gt; false
  [2] pry(main)&gt; require 'google'
  LoadError: cannot load such file -- google
  from (pry):7:in `require'
  [3] pry(main)&gt; require 'google-search'
  LoadError: cannot load such file -- google-search
  from (pry):8:in `require'
  </code></pre>
  
  <p>Should I change the internal structure or I have to do something else? I really like the idea of require "google/search" but it's ok if I have to change it. How does this work? Thanks a lot.</p>