# \`require': no such file to load on Windows

**URL:** <https://www.ruby-forum.com/t/require-no-such-file-to-load-on-windows/189375>\
**Category:** Ruby\
**Created:** [May 30, 2010, 11:22am UTC](https://www.ruby-forum.com/t/require-no-such-file-to-load-on-windows/189375 "2010-05-30T11:22:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![f3tus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/b38774/32.png) [@f3tus](https://www.ruby-forum.com/u/f3tus)\
**Post date:** [May 30, 2010, 11:22am UTC](https://www.ruby-forum.com/t/require-no-such-file-to-load-on-windows/189375/1 "2010-05-30T11:22:36Z")

</div>

Hello, I’m new to Ruby and came across this error when trying to run:

spec “C:\Ruby19\wwwjdic2db\spec\p4\_importer\_spec.rb”

The output is as follows:

C:\Ruby19\bin\>spec “C:\Ruby19\project4\spec\p4\_importer\_spec.rb”  
C:\Ruby19\project4\spec\p4\_importer.rb:3:in `require': no such file to load -- p4_importer (LoadError) from C:\Ruby19\project4\spec\p4_importer.rb:3:in`\<top (required)\>’  
from  
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/runner/example\_group\_runner.rb:15:in  
`load' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:15:in`block in load\_files’  
from  
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/runner/example\_group\_runner.rb:14:in  
`each' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:14:in`load\_files’  
from  
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/runner/options.rb:133:in  
`run_examples' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/runner/command_line.rb:9:in`run’  
from C:/Ruby19/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/bin/spec:5:in `<top (required)>' from C:/Ruby19/bin/spec:19:in`load’  
from C:/Ruby19/bin/spec:19:in `’

The installed gems are:

actionmailer (2.3.8, 2.3.5)  
actionpack (2.3.8, 2.3.5)  
activerecord (2.3.8, 2.3.5)  
activeresource (2.3.8, 2.3.5)  
activesupport (2.3.8, 2.3.5)  
ar-extensions (0.9.2)  
aub-record\_filter (0.9.12)  
authlogic (2.1.5)  
authlogic-oid (1.0.4)  
composite\_primary\_keys (2.3.5.1)  
haml (3.0.6)  
rack (1.1.0, 1.0.1)  
rails (2.3.8, 2.3.5)  
rake (0.8.7)  
rspec (1.3.0)  
rspec-rails (1.3.2)  
rubygems-update (1.3.7)  
sqlite3-ruby (1.2.5 x86-mingw32)  
will\_paginate (2.3.14)  
win32console (1.3.0 x86-mingw32)

Why is it saying there is no such file to load?

---

<div class="post-metadata">

**Author:** ![f3tus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/b38774/32.png) [@f3tus](https://www.ruby-forum.com/u/f3tus)\
**Post date:** [May 30, 2010, 11:27am UTC](https://www.ruby-forum.com/t/require-no-such-file-to-load-on-windows/189375/2 "2010-05-30T11:27:56Z")

</div>

Actually, it’s:

spec “C:\Ruby19\project4\spec\p4\_importer\_spec.rb”

I’ve got 4 copies of the same thing with some minor adjustments and  
changes in each one.

---

<div class="post-metadata">

**Author:** ![f3tus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/b38774/32.png) [@f3tus](https://www.ruby-forum.com/u/f3tus)\
**Post date:** [May 30, 2010, 5:35pm UTC](https://www.ruby-forum.com/t/require-no-such-file-to-load-on-windows/189375/3 "2010-05-30T17:35:41Z")

</div>

> **[GitHub - markburns/wwwjdic2db: A project for converting the kanjidic (and in...](https://github.com/markburns/wwwjdic2db)**
>
> A project for converting the kanjidic (and in future edict and Tanaka corpus) files from Jim Breen's wwwjdic project into a database format. - GitHub - markburns/wwwjdic2db: A project for conv...

This is the default application that I’ve been trying to modify and run.  
Can somebody else try if it works for them?

---

<div class="post-metadata">

**Author:** ![f3tus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/b38774/32.png) [@f3tus](https://www.ruby-forum.com/u/f3tus)\
**Post date:** [May 30, 2010, 6:39pm UTC](https://www.ruby-forum.com/t/require-no-such-file-to-load-on-windows/189375/4 "2010-05-30T18:39:33Z")

</div>

On 5/30/10, Toshiro M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> [GitHub - markburns/wwwjdic2db: A project for converting the kanjidic (and in future edict and Tanaka corpus) files from Jim Breen's wwwjdic project into a database format.](http://github.com/markburns/wwwjdic2db)
> 
> This is the default application that I’ve been trying to modify and run.  
> Can somebody else try if it works for them?

Your error message indicates that a file named p4\_importer.rb cannot  
be found. (Or possibly it’s p4\_importer.so (or p4\_importer.dll, since  
you’re on windows).) Ruby’s require searches the global variable  
$LOAD\_PATH for directories which might contain the files you’re trying  
to load. It also searches the currently installed gems. You need to  
find this file p4\_importer.rb and either pass the directory containing  
it to ruby via the -I command-line option or, if it’s in a gem,  
install the appropriate gem.
