ruby-on-rails – 没有路由匹配[GET]“/assets/bootstrap.css.map”

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – 没有路由匹配[GET]“/assets/bootstrap.css.map”前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在rails4,bootstrap 3上运行,我的终端出现以下错误消息.
Started GET "/assets/bootstrap.css.map" for 127.0.0.1 at 2014-08-24 23:41:36 -0700

ActionController::RoutingError (No route matches [GET] "/assets/bootstrap.css.map"):
  actionpack (4.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  actionpack (4.1.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'


railties (4.1.4) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.1.4) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.1.4) lib/active_support/tagged_logging.rb:68:in `block in tagged'
  activesupport (4.1.4) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (4.1.4) lib/active_support/tagged_logging.rb:68:in `tagged'
  railties (4.1.4) lib/rails/rack/logger.rb:20:in `call'
  actionpack (4.1.4) 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.4) 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.4) lib/action_dispatch/middleware/static.rb:64:in `call'
  rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
  railties (4.1.4) lib/rails/engine.rb:514:in `call'
  railties (4.1.4) 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'

任何人有什么想法如何摆脱这个?

编辑:

这是我的application.css

*= require_tree .
*= require_self
*= require_ladda-themeless
*= require login_form
*= require bootstrap
*/

解决方法

请求bootstrap.css.map的文件是:

/vendor/assets/stylesheets/bootstrap.css

删除最后一行应该解决问题:

/*# sourceMappingURL=bootstrap.css.map */

请参阅here什么是地图文件.

原文链接:https://www.f2er.com/ruby/271598.html

猜你在找的Ruby相关文章