-1

So everytime I start pry console on my windows machine, it initially works as normal for the first line, but then it somehow doubles and repeats itself in some weird way at the next lines.

PS C:\Users\locdu\OneDrive\Desktop\twittery> rails console    
[1] pry(main)> user = User.first
  User Load (3.0ms)  SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT $1  [["LIMIT", 1]]
=> #<User id: 1, email: "dylanbergmann001@gmail.com", created_at: "2023-08-14 09:00:30.491830000 +0000", updated_at: "2023-08-16 00:45:25.674183000 +0000", username: "dylan">
[2] pry(main)> [2] pry(main)> [2] pry(main)> u[2] pry(main)> u[2] pry(main)> us[2] pry(main)> us[2] pry(main)> use[2] pry(main)> use[2] pry(main)> user[2] pry(main)> user[2] pry(main)> user.[2] pry(main)> user.[2] pry(main)> user.v[2] pry(main)> user.v[2] pry(main)> user.va[2] pry(main)> user.va[2] pry(main)> user.val[2] pry(main)> user.val[2] pry(main)> user.valid?] pry(main)> user.vali[2] pry(main)> user.valid[2] pry(main)> user.valid[2] pry(main)> u
  User Exists? (0.7ms)  SELECT 1 AS one FROM "users" WHERE LOWER("users"."username") = LOWER($1) AND "users"."id" != $2 LIMIT $3  [["username", "dylan"], ["id", 1], ["LIMIT", 1]]
=> true
[3] pry(main)> [3] pry(main)>  

Basically, in this example, I first run

user = User.first

to capture the first user and it works perfectly as normal. But then at the second line, I try to check if the user is valid with the commmand

user.valid?

and somehow, the pry console spawns a lot of weird inputs as I type the command, but the result seems to be correct.

My ruby version is 3.2.2, my windows version 11. I tried both pry (with a different program) and pry-rails and they seem to produce this same error.

If you know what is going on, pls help me with this! In the meantime, if you dont know how to fix this but do know how to disable pry console to use irb for rails instead then show me how to pls.

0 Answers0