A standard rails console on a long running rails project has always worked fine on macOS. Recently switched to Ubuntu 18.04, and the rails console in bash and gnome-terminal will always append a \r at the end of every line like so:
Loading development environment (Rails 4.2.8)
irb(main):001:0> \r
irb(main):002:0> \r
irb(main):003:0> User.count\r
(1.5ms) SELECT COUNT(*) FROM "users"
=> 3
irb(main):004:0>
This new behavior also affects scrolling up/down through previous commands, where it will not correctly clear a command and append the previous command after a command.
The .bashrc is the default, with no changes, and default gnome-terminal. (Tested removing changes and issue still appears).
I figured it out eventually:
bundle update rb-readline
And the problem goes away!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With