首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >只是‘`bundle’和application.css.scss似乎没有编译

只是‘`bundle’和application.css.scss似乎没有编译
EN

Stack Overflow用户
提问于 2013-05-15 21:16:44
回答 1查看 805关注 0票数 0

我注意到,我的application.css.scss中没有一个样式被包括在我的应用程序中--突然之间。

这是在我最近做了一个bundle update之后发生的。

这就是改变的地方:

代码语言:javascript
复制
Installing multi_json (1.7.3) 
Installing tilt (1.4.1) 
Installing json (1.8.0) 

Installing sass (3.2.9) 
Installing bootstrap-wysihtml5-rails (0.3.1.20) 

Installing callsite (0.0.11) 
Installing cancan (1.6.10) 
Installing currencies (0.4.1) 

Installing database_cleaner (1.0.0) 
Installing devise (2.2.4) 
Installing net-scp (1.1.1) 

Installing fog (1.11.1) 
Installing letter_opener (1.1.1) 
Installing meta_request (0.2.5) 

Installing newrelic_rpm (3.6.2.96) 
Installing rails_admin (0.4.8) 
Installing uglifier (2.1.0) 

这是我的Gemfile的当前状态:

代码语言:javascript
复制
source 'https://rubygems.org'

gem 'rails', '3.2.13'

group :assets do
  gem 'sass-rails',   '>= 3.2.3'
  gem 'coffee-rails', '>= 3.2.1'
  gem 'uglifier', '>= 1.0.3'
end

group   :development do
    gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git'
    gem 'sextant'
  gem "quiet_assets", ">= 1.0.2"
  gem "better_errors", ">= 0.7.2"
  gem "binding_of_caller", ">= 0.7.1"    
    gem 'meta_request'
    gem 'execjs'
    gem 'therubyracer'  
  gem "letter_opener"
  gem 'bullet'   
  # gem 'rack-mini-profiler'   
end

group :test do
  gem "database_cleaner", ">= 1.0.0.RC1"
  gem "email_spec", ">= 1.4.0"
end

group :development, :test do
  gem "rspec-rails", ">= 2.12.2"
end

gem "jquery-rails"
gem "thin", ">= 1.5.0"
gem "pg", ">= 0.15.0"
gem "font-awesome-sass-rails"
gem "bootstrap-sass", ">= 2.3.1.0"
gem "bootstrap-wysihtml5-rails"
gem "sendgrid", ">= 1.0.1"
gem "devise", ">= 2.2.4"
gem "cancan", ">= 1.6.9"
gem "rolify", ">= 3.2.0"
gem "simple_form", ">= 2.1.0"
gem "newrelic_rpm"
gem "rmagick"
gem "mini_magick"
gem "carrierwave"
gem "fog"
gem "piggybak"
gem "piggybak_variants"
gem "piggybak_bundle_discounts"
gem "rails_admin"
gem "acts-as-taggable-on"
gem "friendly_id"
gem "piggybak_stripe"

编辑1

我最初说过,我的应用程序中包含的一些作为//= requires的级联样式表没有被包括在内,但事实并非如此。我已经包括字体-令人敬畏的样式表,我仍然看到图标。我只是没有看到在我的应用程序中应用了我在application.css.scss中包含的任何样式--而在进行更新之前我就已经应用了。

EN

回答 1

Stack Overflow用户

发布于 2013-05-15 22:34:43

我发现了问题。这是在我的application.css.scss顶部的评论中。

最后一个*/有错误的缩进。它与左边的边缘平齐,我需要把它移到右边的一个空间上。

是这样的:

代码语言:javascript
复制
/*
 * 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 _font-awesome
 *= require bootstrap-wysihtml5
 *= require_tree .
*/

当正确的一个是这样:

代码语言:javascript
复制
/*
 * 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 _font-awesome
 *= require bootstrap-wysihtml5
 *= require_tree .
 */

非常微妙,但这是有意义的--因为requires部分中包含的所有样式表都包含在其中。但是关闭*/之后的样式似乎已经被注释掉了。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16575124

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档