-1

I'm running into issues with binding.pry on Windows 11. When I insert it into my Ruby script, the program reaches that line but either skips over it or pauses without accepting any input.

🧪 Problem:

  • binding.pry is hit, but the terminal becomes unresponsive.

  • No input is accepted, and I can't interact with the Pry session.

🖥️ Environment:

  • OS: Windows 11

  • Ruby: 3.x (via RubyInstaller with MSYS2)

  • Pry: Installed via gem install pry

  • Terminal: Tried Command Prompt, PowerShell, Windows Terminal, ConEmu

✅ What I've Tried:

  • Verified require 'pry' is present

  • binding.irb

  • Ran script directly from terminal (ruby script.rb)

  • Tried adding --tty to RSpec

  • Confirmed Pry is installed and loaded

  • Tried switching terminal setting to ensure it works as previous versions

    Start > Setting > Search 'for developers > terminal > set to 'Windows console host'

    after that restart system.

❌ Constraints:

  • I need a solution that works in native Windows terminals

❓ Question:

Is there a known workaround or configuration that enables binding.pry to work interactively in native Windows 11 terminals? Any help would be appreciated!

3
  • Have you tried a completely stripped down standalone program? No gems, no RSpec, no additional libraries. Just plain Ruby code as simple as it gets? Commented Nov 13 at 17:53
  • 1
    Below will work for binding.pry Pry.config.input = STDIN Pry.config.output = STDOUT binding.pry 2 lines added before binding.pry Commented Nov 18 at 7:27
  • That's great. You should add it as an answer and then accept it so others can see the solution too. Commented Nov 18 at 14:57

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.