# Help: IRB not run

**URL:** <https://www.ruby-forum.com/t/help-irb-not-run/260925>\
**Category:** Uncategorized\
**Created:** [February 5, 2021, 1:02am UTC](https://www.ruby-forum.com/t/help-irb-not-run/260925 "2021-02-05T01:02:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lxyang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/d78d45/32.png) [@lxyang](https://www.ruby-forum.com/u/lxyang)\
**Post date:** [February 5, 2021, 1:02am UTC](https://www.ruby-forum.com/t/help-irb-not-run/260925/1 "2021-02-05T01:02:40Z")

</div>

My PC is Windows 10 64-bit professional. I installed IRB 3.0.0-1 x64 without development software. When I clicked interactive ruby, the shell was displayed. In a couple of seconds, it disappeared.

Then I tried to open CMD shell and typed IRB. IRB won’t run and following messages are displayed,

C:\Users\lyang\>irb  
C:/Ruby30-x64/lib/ruby/site\_ruby/3.0.0/irbrc\_predefiner.rb:6:in `write': No such file or directory @ rb_sysopen - P://.irbrc (Errno::ENOENT) from C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/irbrc_predefiner.rb:6:in `\<top (required)\>’  
from internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core\_ext/kernel\_require.rb:85:in `require' from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require’  
from C:/Ruby30-x64/bin/irb.cmd:31:in `’

I installed the same software on another PC with Windows 10, and IRB runs fine.

Can someone help me to resolve this problem?

Thank you.

Longxiang Yang

---

<div class="post-metadata">

**Author:** ![keithrbennett](https://www.ruby-forum.com/user_avatar/www.ruby-forum.com/keithrbennett/32/1341_2.png) [@keithrbennett](https://www.ruby-forum.com/u/keithrbennett)\
**Post date:** [February 8, 2021, 1:12am UTC](https://www.ruby-forum.com/t/help-irb-not-run/260925/2 "2021-02-08T01:12:01Z")

</div>

What is drive P:? You might want to reinstall Ruby, that might fix it.

---

<div class="post-metadata">

**Author:** ![lxyang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/d78d45/32.png) [@lxyang](https://www.ruby-forum.com/u/lxyang)\
**Post date:** [February 8, 2021, 4:57am UTC](https://www.ruby-forum.com/t/help-irb-not-run/260925/3 "2021-02-08T04:57:42Z")

</div>

Hello Keith,

Thank you for your reply. I checked my PC and found P drive is mapped to a network drive. I deleted the P drive, restarted PC. Make sure the P drive is removed. I reinstalled IRB 3.0.0-1 x64. IRB still doesn’t work as before. Same error message is displayed when I used CMD to run IRB.

/Ruby30-x64/lib/ruby/site\_ruby/3.0.0/irbrc\_predefiner.rb:6:in `write’: No such file or directory @ rb\_sysopen - P://.irbrc (Errno::ENOENT)

I further looked at irbrc\_predefiner.rb file. Line 6 shows:

File.write irbrc\_file, \<\<-EOT

I don’t understand why it is pointing to a non-existing P: drive.

Any further help is greatly appreciated.

Longxiang Yang

---

<div class="post-metadata">

**Author:** ![keithrbennett](https://www.ruby-forum.com/user_avatar/www.ruby-forum.com/keithrbennett/32/1341_2.png) [@keithrbennett](https://www.ruby-forum.com/u/keithrbennett)\
**Post date:** [February 8, 2021, 4:53pm UTC](https://www.ruby-forum.com/t/help-irb-not-run/260925/4 "2021-02-08T16:53:14Z")

</div>

I’m just guessing here, but do you have an environment variable pointing to P:? Such as `HOME`?

---

<div class="post-metadata">

**Author:** ![lxyang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/d78d45/32.png) [@lxyang](https://www.ruby-forum.com/u/lxyang)\
**Post date:** [February 8, 2021, 10:16pm UTC](https://www.ruby-forum.com/t/help-irb-not-run/260925/5 "2021-02-08T22:16:23Z")

</div>

Hi Keith,

I reviewed my Windows registers and found home drive is set to P. After changing it to C. IRB is running properly.

Thank you very much for your help.

Longxiang Yang
