好的,这是一个非常奇怪的问题,我有一个使用引导网格的 Rails 应用程序,没有其他引导 css 文件。在本地,一切都呈现得很好,但在生产模式下,(我正在使用 Heroku)似乎正在添加引导 css 样式表,我不知道它来自哪里或为什么这样做。它以前没有这样做,我很确定我没有添加任何会自动包含引导 css 样式的东西。我希望我在这里遗漏了一些明显的东西,但是我无法确定问题所在,而且以前从未发生过,希望你们能告诉我我做错了什么。我将发布我的 gem 文件,因为我认为它必须与此有关:
source 'https://rubygems.org'
gem 'rails', '3.2.12'
gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '1.0.1'
gem 'jquery-rails', '2.0.2'
gem 'activeadmin'
gem 'rename'
gem 'obscenity'
gem 'omniauth'
gem 'omniauth-facebook'
group :development, :test do
gem 'sqlite3', '1.3.5'
gem 'rspec-rails', '2.11.0'
gem 'guard-rspec', '1.2.1'
gem 'guard-spork', '1.2.0'
gem 'spork', '0.9.2'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '3.2.5'
gem 'coffee-rails', '3.2.2'
gem 'uglifier', '1.2.3'
end
group :test do
gem 'capybara', '1.1.2'
gem 'factory_girl_rails', '4.1.0'
gem 'cucumber-rails', '1.2.1', :require => false
gem 'database_cleaner', '0.7.0'
# gem 'launchy', '2.1.0'
# gem 'rb-fsevent', '0.9.1', :require => false
# gem 'growl', '1.0.3'
end
group :production do
gem 'pg', '0.12.2'
end
这是我的application.css文件:
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require_tree .
*/
这是我的application.html文件:
<!DOCTYPE html>
<html lang="en">
<head>
<title><%= full_title(yield(:title)) %></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,600' rel='stylesheet' type='text/css'>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>
<!-- Application alerts -->
<% flash.each do |key, value| %>
<div class="alert alert-<%= key %>">
<div class="container">
<%= value if value.length > 0 %>
</div>
</div>
<% end %>
<%= render "layouts/nav" %>
<%= yield %>
<%= render "layouts/footer" %>
</body>
</html>