我已經設置了一個新的Rails應用程序,我想使用Bootstrap。我已經加入:Bootstrap無法在Rails應用程序中工作
/* *** gemfile *** */
gem 'bootstrap-sass'
gem 'autoprefixer-rails'
我application.scss
文件:
/*
*= require_tree .
*= require_self
*/
@import "bootstrap-sprockets";
@import "bootstrap";
我的application.js文件:
//= require jquery
//= require bootstrap-sprockets
//= require jquery_ujs
//= require turbolinks
//= require_tree .
一切是默認的,我已經運行捆綁安裝,但仍然是我的http://localhost:3000/widgets
文件只是默認的html,而不是引導程序的默認值。
這是爲什麼,我該如何調試它?
只是要說清楚,因爲你的措辭可能意味着要麼不應用css,要麼你認爲它會改變html:你必須自己改變widgets的html,並使用引導類來看看佈局。另外,如果您使用腳手架,則必須移除腳手架的css文件。 – nathanvda
@nathanvda我有腳手架的CSS,但我不明白爲什麼會阻止application.scss工作?我已經在html中包含了默認的引導程序導航類,所以我正在等待它作爲標誌引導程序正在工作嗎? –
好吧,腳手架css會弄亂默認的引導程序字體定義。但正如我所說:目前還不清楚你要什麼。腳手架CSS不會推翻導航類;) – nathanvda