我正在尝试按照教程我的micheal harlt并遇到一个小问题。好像我的引导带没有正确导入。我在custom.css.scss中所做的更改没有被反映。
Custom.css.scss
@import "bootstrap-sprockets";
@import "bootstrap";
/* universal */
body {
padding-top: 60px;
}
section {
overflow: auto;
}
textarea {
resize: vertical;
}
.center {
text-align: center;
}
.center h1 {
margin-bottom: 10px;
}
Application.css.scss
/*
* This is a manifest file that'll be compiled into application.css
.
.
.
*= require_self
*= require_tree .
*/
Gem file.
source 'https://rubygems.org'
gem 'rails', '3.2.16'
gem 'bootstrap-sass', '3.2.0.0'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
group :development, :test do
gem 'sqlite3', '1.3.9'
end
group :test do
gem 'minitest-reporters', '1.0.5'
gem 'mini_backtrace', '0.1.3'
gem 'guard-minitest', '2.3.1'
end
group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor', '0.0.2'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'.
当我尝试访问我的主页时,它仍然看起来像普通的HTML页面。 这里有什么东西不见了吗?
答案 0 :(得分:0)
尝试下去:
gem 'bootstrap-sass', '3.1.1.0'
然后运行bundle install
与Rails 3.2兼容的最新版bootstrap-sass是v3.1.1.0。这可能是问题所在。 More in Bootstrap-sass page