我正在使用Bootstrap,但由于某些原因它没有造型。
我已经尝试将表单和导航栏的引导代码粘贴到我的主视图中,它只是在没有引导样式的情况下正常显示。
我有
@import“bootstrap”;在我的样式表中
和我的Gemfile中的相应gem。我忘记了设置的某些部分吗?或者为什么它不起作用。我几天前在过去的项目中使用它,但不知道为什么这次没有造型。
这是我的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
答案 0 :(得分:0)
确保您bundle install
或bundle
(默认安装)并向关键宝石添加版本。
也可以尝试
rake temp:clear
答案 1 :(得分:0)
我没有将application.css文件重命名为application.css.scss这是我的问题:/现在修复了!