Rails 控制台中的 Hirb 用于输出长数据中断控制台

Rails Hirb in console for outputting long data breaks console

我在控制台中使用 Rails 4.2 和 Hirb。

并且当我尝试在控制台中输出 long/big 数据时。控制台坏了。

它显示 (END),我无法再输入或 运行 其他命令,我必须关闭控制台才能修复。

有什么方法可以配置 Hirb 或命令来退出 (END) 状态吗?

这是我所做的一个例子

$ spring rails c -s
Loading development environment in sandbox (Rails 4.2.0)
Any modifications you make will be rolled back on exit
[1] pry(main)> an = []
=> []
[2] pry(main)> an << {account: Account.first}
  Account Load (1.4ms)  SELECT  "accounts".* FROM "accounts" WHERE "accounts"."deleted_at" IS NULL  ORDER BY "accounts"."id" ASC LIMIT 1
=> [{:account=>
   #<Account:0x007fbbb363feb8
    id: 1,
    ................
    ................
    deleted_at: nil,
    created_at: Thu, 12 Mar 2015 03:03:35 UTC +00:00,
    updated_at: Thu, 12 Mar 2015 03:10:40 UTC +00:00>}]
[3] pry(main)> an << {account: Account.second}
  Account Load (0.6ms)  SELECT  "accounts".* FROM "accounts" WHERE "accounts"."deleted_at" IS NULL  ORDER BY "accounts"."id" ASC LIMIT 1 OFFSET 1
=> [{:account=>
   #<Account:0x007fbbb363feb8
    id: 1,
    ................
    ................
    deleted_at: nil,
    created_at: Thu, 12 Mar 2015 03:03:35 UTC +00:00,
    updated_at: Thu, 12 Mar 2015 03:10:40 UTC +00:00>},
 {:account=>
   #<Account:0x007fbbb736acc0
    id: 2,
    ................
    ................
    deleted_at: nil,
    created_at: Thu, 12 Mar 2015 03:03:36 UTC +00:00,
    updated_at: Thu, 12 Mar 2015 03:10:36 UTC +00:00>}]
(END) 

您可以使用向上和向下箭头浏览数据,或使用 'q' 退出。