rails - Redirecting console output to a file

前端 未结 7 833
时光取名叫无心
时光取名叫无心 2020-12-12 09:51

On a bash console, if I do this:

cd mydir
ls -l > mydir.txt

The > operator captures the standard input and redirects it to a file; so I

7条回答
  •  独厮守ぢ
    2020-12-12 10:29

    Use hirb. It automatically pages any output in irb that is longer than a screenful. Put this in a console session to see this work:

    >> require 'rubygems'
    >> require 'hirb'
    >> Hirb.enable
    

    For more on how this works, read this post.

提交回复
热议问题