title: How fix this error: kernel_require.rb:45:in `require': cannot load such file?
body: <p>I have the following structure of files:</p>
  
  <ul>
  <li>execute.rb</li>
  <li>lib
  <ul>
  <li>my_class.rb</li>
  </ul></li>
  </ul>
  
  <p>In the execute.rb I have the code bellow:</p>
  
  <pre><code>#!/usr/bin/ruby
  
  require 'lib/my_class'
  
  my_object= MyClass.new
  
  my_object.some_method
  </code></pre>
  
  <p>And this is the code of my_class.rb:</p>
  
  <pre><code>class MyClass
      def some_method
          puts 'OK'
      end
  end
  </code></pre>
  
  <p>So, I tried run the execute.rb:</p>
  
  <pre><code>ruby execute.rb
  </code></pre>
  
  <p>But I receive this error:</p>
  
  <pre><code>/home/vagrant/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- lib/my_class (LoadError)
      from /home/vagrant/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
      from execute.rb:3:in `&lt;main&gt;'
  </code></pre>
  
  <p>Can anyone help me? I'll appreciate any help.
  Thanks a lot.</p>