How to suppress Rails console/irb outputs

后端 未结 6 976
一生所求
一生所求 2020-12-07 14:01

I\'m stuck with a pretty weird problem.

I was testing some db entries in our production server in Rails Console where almost all the commands were resulting a huge n

6条回答
  •  眼角桃花
    2020-12-07 14:41

    In search of a solution how to silence the irb/console output, I also found an answer at austinruby.com:

    silence irb:

    conf.return_format = ""
    

    default output:

    conf.return_format = "=> %s\n"
    

    limit to eg 512 chars:

    conf.return_format = "=> limited output\n %.512s\n"
    

提交回复
热议问题