# Two RoR probs: script\\console "no such file to load" error,

**URL:** <https://www.ruby-forum.com/t/two-ror-probs-script-console-no-such-file-to-load-error/74543>\
**Category:** Rails\
**Created:** [November 7, 2006, 10:47am UTC](https://www.ruby-forum.com/t/two-ror-probs-script-console-no-such-file-to-load-error/74543 "2006-11-07T10:47:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tctctc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a5b964/32.png) [@tctctc](https://www.ruby-forum.com/u/tctctc)\
**Post date:** [November 7, 2006, 10:47am UTC](https://www.ruby-forum.com/t/two-ror-probs-script-console-no-such-file-to-load-error/74543/1 "2006-11-07T10:47:47Z")

</div>

Hi,

I am a newb to RoR but finding it much more difficult than most people  
maintain. I’m trying to follow a beginner’s tutorial and have  
meticulously followed each step but keep running into problems. Just  
in case, I have even tried everything on two different machines with no  
luck.

(The tutorial is by Obie F. and can be found on page 14 of  
[http://www.ratio.co.uk/ov9pdf.pdf.](http://www.ratio.co.uk/ov9pdf.pdf.))

My two machines are both Windows XP; for the first I installed  
everything piecemeal (Ruby, Rails, MySQL, etc) and for the second I  
used InstantRails. They both SEEM to be working in every way except  
for the problems given below. I have searched numerous posts and sites  
for some answers, but though people seem to be encountering these  
problems no one has suggested a solution that works for me. PLEASE  
help, if you can–I would so appreciate it!

ERROR 1: This is the error I get when trying to run a Ruby console (a  
la page 19 of the tutorial). Interestingly I did not get this error  
before starting the tutorial.

C:\user\example\>ruby script\console  
Loading development environment.  
c:/Ruby/lib/ruby/1.8/irb/init.rb:252:in `require': no such file to load -- ./script/../config/../config/environment (LoadError) from c:/Ruby/lib/ruby/1.8/irb/init.rb:252:in `load\_modules’  
from c:/Ruby/lib/ruby/1.8/irb/init.rb:250:in `load_modules' from c:/Ruby/lib/ruby/1.8/irb/init.rb:21:in `setup’  
from c:/Ruby/lib/ruby/1.8/irb.rb:54:in `start’  
from c:/Ruby/bin/irb.bat:20

ERROR 2: This is the error I get when trying to run a generic test  
(nothing customized yet) using rake (a la page 20 of the tutorial):

C:\user\example\>rake  
(in C:/user/example)  
c:/Ruby/bin/ruby -Ilib;test  
“c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake\_test\_loader.rb”  
c:/Ruby/bin/ruby -Ilib;test  
“c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake\_test\_loader.rb”  
rake aborted!  
Test failures

In case you are interested to see the whole trace (using --trace), it  
is as follows:

C:\user\example\>rake --trace  
(in C:/user/example)  
\*\* Invoke default (first\_time)  
\*\* Invoke test (first\_time)  
\*\* Execute test  
\*\* Invoke test:units (first\_time)  
\*\* Invoke db:test:prepare (first\_time)  
\*\* Invoke environment (first\_time)  
\*\* Execute environment  
\*\* Execute db:test:prepare  
\*\* Invoke db:test:clone (first\_time)  
\*\* Invoke db:schema:dump (first\_time)  
\*\* Invoke environment  
\*\* Execute db:schema:dump  
\*\* Execute db:test:clone  
\*\* Invoke db:schema:load (first\_time)  
\*\* Invoke environment  
\*\* Execute db:schema:load  
\*\* Invoke test:functionals (first\_time)  
\*\* Invoke db:test:prepare  
\*\* Execute test:functionals  
c:/Ruby/bin/ruby -Ilib;test  
“c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake\_test\_loader.rb”  
\*\* Invoke test:integration (first\_time)  
\*\* Invoke db:test:prepare  
\*\* Execute test:integration  
c:/Ruby/bin/ruby -Ilib;test  
“c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake\_test\_loader.rb”  
rake aborted!  
Test failures  
c:/Ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/tasks/testing.rake:35  
c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute' c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute’  
c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke' c:/Ruby/lib/ruby/1.8/thread.rb:135:in `synchronize’  
c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke' c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:364:in `invoke\_prerequisites’  
c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in `each' c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:363:in `invoke\_prerequisites’  
c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:356:in `invoke' c:/Ruby/lib/ruby/1.8/thread.rb:135:in `synchronize’  
c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke' c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run’  
c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run’  
c:/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7  
c:/Ruby/bin/rake.bat:25

Does anyone have any clue what is going on? As I say, I have searched  
numerous groups and sites and can’t find any answers to these two  
problems. Please do help!

Many thanks in advance,  
TOM

---

<div class="post-metadata">

**Author:** ![tctctc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a5b964/32.png) [@tctctc](https://www.ruby-forum.com/u/tctctc)\
**Post date:** [November 7, 2006, 10:48am UTC](https://www.ruby-forum.com/t/two-ror-probs-script-console-no-such-file-to-load-error/74543/2 "2006-11-07T10:48:08Z")

</div>

Hi all,

I’ve figured out at least an immediate workaround to the first error.  
Hope this saves some other people some time. You simply run ruby with  
the entire path indicated:

ruby c:\user\example\script\console

That’s it.

TOM

---

<div class="post-metadata">

**Author:** ![tctctc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a5b964/32.png) [@tctctc](https://www.ruby-forum.com/u/tctctc)\
**Post date:** [November 7, 2006, 10:49am UTC](https://www.ruby-forum.com/t/two-ror-probs-script-console-no-such-file-to-load-error/74543/3 "2006-11-07T10:49:05Z")

</div>

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

> Hi all,
> 
> I’ve figured out at least an immediate workaround to the first error.  
> Hope this saves some other people some time. You simply run ruby with  
> the entire path indicated:
> 
> ruby c:\user\example\script\console
> 
> That’s it.

Are you opening your command window through Instant Rails (“Rails  
Applications \> Open Ruby Console Window”)? This is important because  
it ensures that the ruby\bin directory for the copy of ruby included  
in IR is first on your system path.

Also, when using Instant Rails, your rails applications need to be  
inside of the …\InstantRails\rails\_apps directory.

And, finally, when you try to start up the rails console via “ruby  
script\console” your current directory _must_ be the root directory of  
your rails application.

Make sure all three conditions above are true and try again – it should  
work.

Curt
