IO.console is nil when running inside a Spring process

Open
#482 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby
Domain
tooling

Research direction

Start by reproducing the issue inside a Spring process and compare IO.console.winsize with the Rake approach linked in the report. Trace how the Spring process handles its console IO; done means IO.console is available there or the supported console-width behavior is documented and covered by a regression test.

Written by the indexing model from the issue text.

Description

bug

I'm trying to make something that goes the full width of the console.

Typically I can do this either by stealing the bit from rake here or by using IO.console.winsize.

I prefer IO.console.winsize because it's exponentially faster than shelling out. Unfortunately, when running a spring process, IO.console is nil. The rake method still works, however, as I mentioned, it's very slow comparatively.

Dominant language
Ruby
Stars
2.8k
Forks
342
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rails/spring

All issues in rails/spring

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.