2013-12-16 54 views
0

我正在使用Rails 4和引導2寶石(還沒有找到是官方/良好支持bootstrap 3寶石尚未)爲我的網絡應用程序。Rails終端阻塞與加載引導文件

但問題是,我試圖通過服務器日誌中我的終端工作,它堵塞了一堆引導GET請求的:

 
Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/bootstrap_and_overrides.css?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/messages.css?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/scaffolds.css?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/styles.css?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/dataTables/jquery.dataTables.css?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/dataTables/jquery.dataTables.bootstrap.css?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/twitter/bootstrap/bootstrap-alert.js?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/twitter/bootstrap/bootstrap-modal.js?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/twitter/bootstrap/bootstrap-dropdown.js?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/twitter/bootstrap/bootstrap-transition.js?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/twitter/bootstrap/bootstrap-scrollspy.js?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/twitter/bootstrap/bootstrap-popover.js?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/twitter/bootstrap/bootstrap-tab.js?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/twitter/bootstrap/bootstrap-tooltip.js?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/twitter/bootstrap/bootstrap-button.js?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/twitter/bootstrap/bootstrap-collapse.js?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/twitter/bootstrap.js?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/twitter/bootstrap/bootstrap-typeahead.js?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/twitter/bootstrap/bootstrap-carousel.js?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/turbolinks.js?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/twitter/bootstrap/bootstrap-affix.js?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/bootstrap.js?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/dataTables/jquery.dataTables.js?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2013-12-16 13:48:59 -0800 


Started GET "/assets/task_sessions.js?body=1" for 127.0.0.1 at 2013-12-16 13:49:00 -0800 


Started GET "/assets/tasks.js?body=1" for 127.0.0.1 at 2013-12-16 13:49:00 -0800 


Started GET "/assets/welcome.js?body=1" for 127.0.0.1 at 2013-12-16 13:49:00 -0800 

有什麼辦法不使這些事情出現的每一個請求,使調試和通過日誌更容易?

謝謝!

回答

0

有一種叫做quiet_assets的寶石,它幾乎可以滿足你的需求。

https://github.com/evrone/quiet_assets

只需添加gem 'quiet_assets', group: :development到你的Gemfile和運行bundle install

默認情況下,抑制資產日誌消息,但你可以選擇重新接通。