我必须在Ruby gem中运行system "rake assets:precompile"
。
如何防止它向控制台输出任何内容?目前它正在输出以下内容:
I, [2014-01-19T14:11:19.599828 #76714] INFO -- : Writing /Users/josh/Documents/Work/MuheimWebdesign/transition/public/assets/application-90b828df450eb4e5dd0b88931da42ead.js
I, [2014-01-19T14:11:19.929472 #76714] INFO -- : Writing /Users/josh/Documents/Work/MuheimWebdesign/transition/public/assets/application-b1bed1c63f05b07c72f1ac7e31b65551.css
答案 0 :(得分:2)
您可以将输出重定向到a place nothing ever happens:
system "rake assets:precompile &> /dev/null"