doy51723 2015-07-09 12:58
浏览 88

content:“错误:导入的文件未找到或不可读:指南针/重置

Having difficulty in importing Sass libraries in both Netbeans and Notepad++

/sass
    |--screen.scss
/stylesheets
    |--screen.css   
/config.rb
/index.html

/sass/screen.scss

@import "compass/reset";
@import "compass";

with error:

content: "Error: File to import not found or unreadable: compass/reset

I also try to include them in /config.rb

require 'compass/import-once/activate'
require "compass/reset"
require "compass"

but that doesn't work either?

Here's the Backtrace:

C:\xampp\htdocs\sass-project.local\sass\screen.scss:6
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/import_node.rb:67:in `rescue in import'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/import_node.rb:45:in `import'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/import_node.rb:28:in `imported_file'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/import_node.rb:37:in `css_import?'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/visitors/perform.rb:311:in `visit_import'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/visitors/base.rb:36:in `visit'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/visitors/perform.rb:158:in `block in visit'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/stack.rb:79:in `block in with_base'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/stack.rb:115:in `with_frame'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/stack.rb:79:in `with_base'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/visitors/perform.rb:158:in `visit'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/visitors/base.rb:52:in `block in visit_children'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/visitors/base.rb:52:in `map'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/visitors/base.rb:52:in `visit_children'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/visitors/perform.rb:167:in `block in visit_children'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/visitors/perform.rb:179:in `with_environment'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/visitors/perform.rb:166:in `visit_children'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/visitors/base.rb:36:in `block in visit'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/visitors/perform.rb:186:in `visit_root'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/visitors/base.rb:36:in `visit'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/visitors/perform.rb:157:in `visit'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/visitors/perform.rb:8:in `visit'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/root_node.rb:36:in `css_tree'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/tree/root_node.rb:29:in `render_with_sourcemap'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/engine.rb:378:in `_render_with_sourcemap'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/engine.rb:295:in `render_with_sourcemap'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/exec/sass_scss.rb:410:in `run'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/exec/sass_scss.rb:63:in `process_result'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/exec/base.rb:52:in `parse'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/lib/sass/exec/base.rb:19:in `parse!'
C:/Ruby/lib/ruby/gems/2.1.0/gems/sass-3.4.15/bin/sass:13:in `<top (required)>'
C:/Ruby/bin/sass:23:in `load'
C:/Ruby/bin/sass:23:in `<main>'
*/
body:before {
white-space: pre;
font-family: monospace;
content: "Error: File to import not found or unreadable: compass/reset.\A         on line 6 of C:\xampp\htdocs\sass-project.local\sass\screen.scss\A \A 1: /* Welcome to Compass.\A 2:  * In this file you should write your main styles. (or centralize your imports)\A 3:  * Import this file using the following HTML or equivalent:\A 4:  * <link href=\"/stylesheets/screen.css\" media=\"screen, projection\" rel=\"stylesheet\" type=\"text/css\" /> */\A 5: \A 6: @import \"compass/reset\";\A 7: @import \"compass\";\A 8: \A 9: \A 10: $my_color: #BADA55;\A 11: $h1_color: rgb(200,0,0);"; }

Not found or unreadable? OK, so I go looking for it/them and check the permissions while I'm at it. Hang on, what exactly am I looking for? I found:

C:\Users\andrewc\Documents\.sass-cache\69ba191bdc86f18d2d34f5346b2006a9115bc64aeset.scss which isn't write-protected.

And searching for compass.scss returns nothing found.

/config.rb

require 'compass/import-once/activate'
# Require any additional compass plugins here.

# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "stylesheets"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts"

Back at the terminal, If I issue the command:

C:\xampp\htdocs\sass-project.local>compass compile --force

write stylesheets/ie.css
write stylesheets/print.css
write stylesheets/screen.css

My styles load and everything seems fine with the stylesheet back to normal (no errors reported) and styles OK in the browser.

Im using Sass, Windows & Ruby:

C:\xampp\htdocs\sass-project.local>compass -v

Compass 1.0.3 (Polaris)
Copyright (c) 2008-2015 Chris Eppstein
Released under the MIT License.
Compass is charityware.
Please make a tax deductable donation for a worthy cause: http://umdf.org/compass

C:\xampp\htdocs\sass-project.local>ruby -v

ruby 2.1.6p336 (2015-04-13 revision 50298) [x64-mingw32]

C:\xampp\htdocs\sass-project.local>sass -v

Sass 3.4.15 (Selective Steve)

I shouldn't have to force a compile at the terminal every time I make an edit?

I did see this: https://github.com/Compass/compass/issues/1642 but wasn't sure if it applied to me?

help

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥30 这是哪个作者做的宝宝起名网站
    • ¥60 版本过低apk如何修改可以兼容新的安卓系统
    • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
    • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
    • ¥50 有数据,怎么用matlab求全要素生产率
    • ¥15 TI的insta-spin例程
    • ¥15 完成下列问题完成下列问题
    • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
    • ¥15 YoloV5 第三方库的版本对照问题
    • ¥15 请完成下列相关问题!