# "require" no such file to load

**URL:** <https://www.ruby-forum.com/t/require-no-such-file-to-load/195998>\
**Category:** Ruby\
**Created:** [October 5, 2010, 2:35am UTC](https://www.ruby-forum.com/t/require-no-such-file-to-load/195998 "2010-10-05T02:35:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anthonyob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a3d4f5/32.png) [@anthonyob](https://www.ruby-forum.com/u/anthonyob)\
**Post date:** [October 5, 2010, 2:35am UTC](https://www.ruby-forum.com/t/require-no-such-file-to-load/195998/1 "2010-10-05T02:35:47Z")

</div>

Here is the error:

\<internal"lib/rubygems/custom\_require\>:29:in ‘require’: no such file to  
load –  
p030motorcycle (LoadError)  
from internal:lib/rubygems/custom\_require:29:in ‘require’  
from p031motorcycletest.rb:2:in ‘’

---

<div class="post-metadata">

**Author:** ![anthonyob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a3d4f5/32.png) [@anthonyob](https://www.ruby-forum.com/u/anthonyob)\
**Post date:** [October 5, 2010, 10:19am UTC](https://www.ruby-forum.com/t/require-no-such-file-to-load/195998/2 "2010-10-05T10:19:32Z")

</div>

Anthony Ob wrote:

> Here is the error:
> 
> \<internal"lib/rubygems/custom\_require\>:29:in ‘require’: no such file to  
> load –  
> p030motorcycle (LoadError)  
> from internal:lib/rubygems/custom\_require:29:in ‘require’  
> from p031motorcycletest.rb:2:in ‘’

This means: ruby could not find any file called p030motorcycletest.rb in  
any of the directories listed in your $LOAD\_PATH.

Try “puts $LOAD\_PATH” to see the list of directories searched.

If you’re on ruby 1.9, then you no longer get the current directory in  
the path. You could try require “./p030motorcycle”, or I think 1.9 has  
relative\_require.
