Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails console on linux always shows \r at end of every line

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).

like image 628
P. Q. Avatar asked May 23 '18 22:05

P. Q.


1 Answers

I figured it out eventually:

bundle update rb-readline

And the problem goes away!

like image 114
P. Q. Avatar answered Sep 28 '22 04:09

P. Q.