【问题标题】:More informative SASS error messages?更多信息的 SASS 错误消息?
【发布时间】:2011-12-18 20:11:19
【问题描述】:

如何从 SASS 获得更多信息性错误消息?这是一个在开发模式下运行良好的 Rails 3.1 应用程序,在生产中我得到的只是:

Sass::SyntaxError in Pages#home

Showing C:/documents/projects/aaa_0003/implementation/ror/aaa0003/app/views/layouts/application.html.erb where line #7 raised:

0.3 is not a color for `alpha'
  (in C:/documents/projects/aaa_0003/implementation/ror/aaa0003/app/assets/stylesheets/application.css)
Extracted source (around line #7):

4:  <head>
5:      <title><%= title %></title>
6:      <%= csrf_meta_tag %>
7:      <%= stylesheet_link_tag    "application" %>
8:      <%= javascript_include_tag "application" %>

宝石文件是:

source 'http://rubygems.org'

gem 'rails', '3.1.3'

gem 'pg', '0.11.0'
gem 'gravatar_image_tag', '1.0.0.pre2'
gem 'will_paginate'
gem 'rake'
gem "jquery-rails"
gem "nested_form"
gem 'acts-as-taggable-on'


# Gems used only for assets and not required
# in production environments by default.
gem 'sass-rails',   '~> 3.1.5'
group :assets do
  gem 'coffee-rails', '~> 3.1.1'
  gem 'uglifier', '>= 1.0.3'
end


group :development do
  gem 'rspec-rails', '2.5.0'
  gem 'annotate', '2.4.0'
  gem 'faker', '0.3.1'   ## for creating loads of random users to test the site with.
end

group :production do
  gem 'therubyracer-heroku'
end

谢谢。

【问题讨论】:

标签: ruby-on-rails sass


【解决方案1】:

所以我最终只是手动搜索了我的 .css.scss 文件并找到了有问题的行,这确实是在尝试使用已弃用/损坏的 css 样式规则将不透明度设置为 0.3。现在一切正常。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-10-16
    • 1970-01-01
    • 2010-09-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-22
    相关资源
    最近更新 更多