在我的Rails 4应用程序中,每当我调用任何控制器操作或页面重新加载时,我的终端显示一些错误,但我的应用程序工作正常,没有功能卡住,但我不知道为什么会发生这种情况,因为我已经注意到了现在。有没有办法解决它。
Started GET "/assets/bootstrap/glyphicons-halflings-regular.woff2" for 127.0.0.1 at 2016-03-04 15:49:29 +0530
ActionController::RoutingError (No route matches [GET] "/assets/bootstrap/glyphicons-halflings-regular.woff2"):
actionpack (4.1.9) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (4.1.9) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.1.9) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.1.9) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.1.9) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.1.9) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.1.9) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.1.9) lib/rails/rack/logger.rb:20:in `call'
request_store (1.2.0) lib/request_store/middleware.rb:8:in `call'
actionpack (4.1.9) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.1.9) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
actionpack (4.1.9) lib/action_dispatch/middleware/static.rb:84:in `call'
rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
railties (4.1.9) lib/rails/engine.rb:514:in `call'
railties (4.1.9) lib/rails/application.rb:144:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
/home/praveen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
/home/praveen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
/home/praveen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
Rendered /home/praveen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.1.9/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.5ms)
Rendered /home/praveen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.1.9/lib/action_dispatch/middleware/templates/routes/_route.html.erb (9.9ms)
Rendered /home/praveen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.1.9/lib/action_dispatch/middleware/templates/routes/_table.html.erb (3.2ms)
Rendered /home/praveen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.1.9/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (96.6ms)
Started GET "/assets/bootstrap/glyphicons-halflings-regular.woff" for 127.0.0.1 at 2016-03-04 15:49:29 +0530
答案 0 :(得分:1)
在css文件中搜索@font-face
并相应地设置资源的路径。
@font-face {
font-family: 'FontAwesome';
src: url("<%= asset_path 'fontawesome-webfont.eot' %>");
src: url("<%= asset_path 'fontawesome-webfont.eot#iefix' %>") format('embedded-opentype'), url("<%= asset_path 'fontawesome-webfont.woff' %>") format('woff'), url("<%= asset_path 'fontawesome-webfont.ttf' %>") format('truetype'), url("<%= asset_path 'fontawesome-webfont.svg#fontawesomeregular' %>") format('svg');
font-weight: normal;
font-style: normal;
}