0

我正在使用rails3与bootstrap-sass gem。找不到图标

我有一个错误:

ActionController::RoutingError (No route matches [GET] "/img/glyphicons-halflings.png"): 

bootstrap_and_overrides.css.scss是:

@import "bootstrap"; 
body { padding-top: 60px; } 
@import "bootstrap-responsive"; 

的application.js

//= require jquery 
//= require jquery_ujs 
//= require bootstrap 
//= require paloma 
//= require_tree . 
+0

没有路线匹配[GET]“/img/glyphicons-halflings.png”意味着你没有在资产img中添加任何图像glyphicons-halflings.png – Debadatt

回答

2

尝试bootstrap_and_overrides.css.scss验证码,如果您使用gem "twitter-bootstrap-rails"

@import "twitter/bootstrap/bootstrap"; 
@import "twitter/bootstrap/responsive"; 

// Set the correct sprite paths 
@iconSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings.png"); 
@iconWhiteSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings-white.png");