-
Notifications
You must be signed in to change notification settings - Fork 127
IRB Broken when used with bin/dev
#1090
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I was getting a very similar error message: I found that IRB 1.14.1 worked, and every version from 1.14.2 on crashes with the same backtrace. I updated my gem "reline", github: "ruby/reline", branch: "master" Or you could downgrade to IRB 1.14.1, if you want to be more conservative. Pertinent logs:
|
Great. I'm going to switch to |
Uh oh!
There was an error while loading. Please reload this page.
Context
By
bin/dev
, I mean the sort of wrapper script that started shipping with Rails 7, which is just callingexec foreman start -f Procfile.dev
to launch multiple processes at once. This is similar to howheroku local
, which usesnode-foreman
works. The idea is a developer only has to run a single command (bin/dev
) and several processes will be spun up. We've been using a setup very similar to this for a long time and it's been rock solid.We also use the
debug
Gem to aid with debugging, and useRUBY_DEBUG_IRB_CONSOLE=true
to set IRB as our debug console. Again, this has been solid for a long time.Today our IRB was upgraded from
1.14.1
to something newer and we started seeing errors when trying to start processes viabin/dev
.The error
I did some digging and as of IRB
1.14.2
we see the following errors when trying to launch our Rails app viabin/dev
:Disabling
RUBY_DEBUG_IRB_CONSOLE
or removing thedebug
gem allows the process(es) to launch as expected. I was able to narrow the problem down to the change to page output in irb:rdbg sessions. If I revert that change, everything works again!Looking at the code, the call from
IRB::Debug::UI#puts
toIRB::Pager.page_content
is breaking because - I think - the attached "screen" is not a TTY, butReline.get_screen_size
is expecting it to be. So an error is raised, but we're not handling it. Maybe we should be?Or… I wonder if the call to
#content_exceeds_screen_height?
should be guarded by#should_page?
?The text was updated successfully, but these errors were encountered: