# Console load failure on windows

**URL:** <https://www.ruby-forum.com/t/console-load-failure-on-windows/54969>\
**Category:** Rails\
**Created:** [March 15, 2006, 5:53pm UTC](https://www.ruby-forum.com/t/console-load-failure-on-windows/54969 "2006-03-15T17:53:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![olbrich](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/5f9b8f/32.png) [@olbrich](https://www.ruby-forum.com/u/olbrich)\
**Post date:** [March 15, 2006, 5:53pm UTC](https://www.ruby-forum.com/t/console-load-failure-on-windows/54969/1 "2006-03-15T17:53:58Z")

</div>

I had a very odd problem recently that manifested itself like this…

C:\rails\_apps\cookbook\>ruby script/console  
Loading development environment.  
c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21:in  
`require__': no such file to load -- ./script/../config/ ../config/environment (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:21:in`require’  
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

After pulling out what was left of my hair and doing some code  
spelunking, I eventually tracked down my problem. It was, of course,  
self-inflicted.

A while back I discovered that the windows ‘cmd.exe’ program checks the  
registry for an ‘autorun’ key and then executes immediately. Being  
lazy, I had set up mine to do a ‘cd c:’ whenever I ran the command  
prompt.

It turns out that this also gets run before every batch file. So this  
breaks all scripts that expect to start in a particular directory, I  
just never noticed it before because this wasn’t my main development  
machine.

Deleting the key fixes the problem and restores the console (and other  
scripts).

There. Now the only other person in the world who will do this can find  
the solution. I feel better now.

\_Kevin

---

<div class="post-metadata">

**Author:** ![olbrich](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/5f9b8f/32.png) [@olbrich](https://www.ruby-forum.com/u/olbrich)\
**Post date:** [July 18, 2007, 5:25pm UTC](https://www.ruby-forum.com/t/console-load-failure-on-windows/54969/2 "2007-07-18T17:25:28Z")

</div>

Hey, thanks soooooooo much for this…

I am that ‘other person’

I have searched lots and lots for a solution and was actually going to  
post a question on the board but decided to search and see if anyone  
else had this problem.

Thanks again for posting this becuase I’ve reinstalled Ruby twice for  
this, as well as rails and all the dependencies. I was considering  
reinstalling my OS too!!! Thanks again. If you’re ever in Glasgow,  
Scotland I’ll buy you a pint.

Stephen
