【问题标题】:why am I getting breakpoint compilation errors为什么会出现断点编译错误
【发布时间】:2014-10-11 06:53:14
【问题描述】:

关于 Drupal Omega 子主题的创建。我刚刚安装了一个新的子主题并运行了 bundle install。

我的主题是想要导入以下库

// Import external libraries.
@import "compass";
@import "breakpoint";
@import "singularitygs";
@import "toolkit-no-css";
@import "toolkit";

在运行 bundle exec guard 或 drush-ogrd 时,我得到以下编译错误。我以前做过这个没有问题,并且怀疑某个地方的宝石不兼容,但我真的不知道从这里去哪里。有什么指点吗?


Pauls-MacBook-Pro:ambient pauldriver$ bundle exec guard
]    error sass/ambient.no-query.scss (Line 3 of sass/ambient.styles.scss: File to import not found or unreadable: breakpoint.
Load paths:
  /Users/pauldriver/Sites/ambientair/sites/all/themes/ambient/sass
  Compass::SpriteImporter
  /Users/pauldriver/Sites/ambientair/sites/all/themes/ambient/sass
  /Users/pauldriver/.rvm/gems/ruby-1.9.3-p547@omega.ambient/gems/compass-core-1.0.0/stylesheets
  /Users/pauldriver/.rvm/gems/ruby-1.9.3-p547@omega.ambient/gems/susy-2.1.3/sass
  /Users/pauldriver/.rvm/gems/ruby-1.9.3-p547@global/gems/compass-normalize-1.5/stylesheets
  /Users/pauldriver/.rvm/gems/ruby-1.9.3-p547@global/gems/compass-rgbapng-0.2.1/lib/stylesheets
  /Users/pauldriver/.rvm/gems/ruby-1.9.3-p547@omega.ambient/gems/toolkit-2.5.2/stylesheets
  Sass::Globbing::Importer)
    error sass/ambient.normalize.scss (Line 8: File to import not found or unreadable: toolkit/border-box.
Load paths:
  /Users/pauldriver/Sites/ambientair/sites/all/themes/ambient/sass
  Compass::SpriteImporter
  /Users/pauldriver/Sites/ambientair/sites/all/themes/ambient/sass
  /Users/pauldriver/.rvm/gems/ruby-1.9.3-p547@omega.ambient/gems/compass-core-1.0.0/stylesheets
  /Users/pauldriver/.rvm/gems/ruby-1.9.3-p547@omega.ambient/gems/susy-2.1.3/sass
  /Users/pauldriver/.rvm/gems/ruby-1.9.3-p547@global/gems/compass-normalize-1.5/stylesheets
  /Users/pauldriver/.rvm/gems/ruby-1.9.3-p547@global/gems/compass-rgbapng-0.2.1/lib/stylesheets
  /Users/pauldriver/.rvm/gems/ruby-1.9.3-p547@omega.ambient/gems/toolkit-2.5.2/stylesheets
  Sass::Globbing::Importer)
    error sass/ambient.styles.scss (Line 3: File to import not found or unreadable: breakpoint.
Load paths:
  /Users/pauldriver/Sites/ambientair/sites/all/themes/ambient/sass
  Compass::SpriteImporter
  /Users/pauldriver/Sites/ambientair/sites/all/themes/ambient/sass
  /Users/pauldriver/.rvm/gems/ruby-1.9.3-p547@omega.ambient/gems/compass-core-1.0.0/stylesheets
  /Users/pauldriver/.rvm/gems/ruby-1.9.3-p547@omega.ambient/gems/susy-2.1.3/sass
  /Users/pauldriver/.rvm/gems/ruby-1.9.3-p547@global/gems/compass-normalize-1.5/stylesheets
  /Users/pauldriver/.rvm/gems/ruby-1.9.3-p547@global/gems/compass-rgbapng-0.2.1/lib/stylesheets
  /Users/pauldriver/.rvm/gems/ruby-1.9.3-p547@omega.ambient/gems/toolkit-2.5.2/stylesheets
  Sass::Globbing::Importer)
Compilation failed in 3 files.

我的 config.rb 文件包含以下内容

##
## This file is only needed for Compass/Sass integration. If you are not using
## Compass, you may safely ignore or delete this file.
##
## If you'd like to learn more about Sass and Compass, see the sass/README.txt
## file for more information.
##

# Default to development if environment is not set.
saved = environment
if (environment.nil?)
  environment = :development
else
  environment = saved
end

# Location of the theme's resources.
css_dir = "css"
sass_dir = "sass"
images_dir = "images"
generated_images_dir = images_dir + "/generated"
javascripts_dir = "js"

# Require any additional compass plugins installed on your system.
require 'compass-normalize'
require 'rgbapng'
require 'toolkit'
require 'susy'
require 'sass-globbing'

##
## You probably don't need to edit anything below this.
##

# You can select your preferred output style here (:expanded, :nested, :compact
# or :compressed).
output_style = (environment == :production) ? :expanded : :nested

# To enable relative paths to assets via compass helper functions. Since Drupal
# themes can be installed in multiple locations, we don't need to worry about
# the absolute path to the theme from the server omega.
relative_assets = true

# Conditionally enable line comments when in development mode.
line_comments = (environment == :production) ? false : true

# Output debugging info in development mode.
sass_options = (environment == :production) ? {} : {:debug_info => true}

# Add the 'sass' directory itself as an import path to ease imports.
add_import_path 'sass'

【问题讨论】:

  • 你的 config.rb 是什么样的?
  • 已编辑问题以显示 config.rb 文件的内容
  • 问题也发布在drupal.org/node/2323235 那里有一些关于工具包错误的建议
  • @cimmanon 我刚试过这个,但没有运气。我仍然收到相同的错误“找不到或无法读取要导入的文件:断点”
  • 我刚开始在为我的同事建造的流浪盒子上遇到同样的问题。我登录到他们的旧盒子,发现安装的 gem 的版本非常不同。

标签: sass drupal-theming guard breakpoint-sass


【解决方案1】:

Omega 4 的最新开发版本似乎修复了大多数不兼容宝石的问题。感谢您对此的帮助。

【讨论】:

    猜你喜欢
    • 2014-06-08
    • 2018-11-29
    • 1970-01-01
    • 2011-07-10
    • 1970-01-01
    • 2011-12-27
    • 2023-03-30
    • 1970-01-01
    • 2013-08-14
    相关资源
    最近更新 更多