title: Understanding Ruby's load paths
body: <p>I'm a little confused about why my project can't load the files it needs, it's a really simple project tree:</p>
  
  <pre><code>processor/
    bin/
    lib/
      processor.rb
      processor/
        mapper.rb
        reducer.rb
  </code></pre>
  
  <p>and my <code>processor.rb</code> file looks like</p>
  
  <pre><code>require 'processor/mapper'
  require 'processor/reducer'
  
  class Processor
  
  end
  </code></pre>
  
  <p>And just for testing it that file mapper looks like:</p>
  
  <pre><code>class Mapper
    def run
      puts "running map"
    end
  end
  </code></pre>
  
  <p>But running <code>ruby lib/processor.rb</code> results in:</p>
  
  <pre><code>&lt;internal:lib/rubygems/custom_require&gt;:29:in `require': no such file to load -- processor/mapper (LoadError)
      from &lt;internal:lib/rubygems/custom_require&gt;:29:in `require'
      from lib/processor.rb:3:in `&lt;class:Processor&gt;'
      from lib/processor.rb:2:in `&lt;main&gt;'    
  </code></pre>