【发布时间】:2014-04-22 11:37:15
【问题描述】:
我正在使用 Bootstrap,但由于某种原因它没有设置任何样式。
我已尝试将表单和导航栏的引导代码粘贴到我的主页视图中,但它在没有引导样式的情况下正常显示。
我有
@import "引导程序";在我的样式表中
以及我的 Gemfile 中的相应宝石。我忘记了设置的某些部分吗?或者为什么它不起作用。几天前我在过去的项目中使用过它,但不知道为什么这次它没有任何样式。
这是我的 GEM 文件:
source 'https://rubygems.org'
gem 'bootstrap-sass', '~> 3.1.1'
gem 'simple_form'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.3'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
【问题讨论】:
标签: html css twitter-bootstrap ruby-on-rails-4 twitter-bootstrap-3