`require': no such file to load on Windows

T

Toshiro Miballza

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 `<main>'

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?
 
T

Toshiro Miballza

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.
 
C

Caleb Clausen

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top