@import“基础";Foundation5中的错误 [英] @import "foundation"; error in foundation5

查看:56
本文介绍了@import“基础";Foundation5中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的项目使用Foundation5,并完成了其站点以及 http://thesassway.com 中定义的所有设置

i am using foundation5 for my project and done all settings as defined in its site and also in http://thesassway.com1 but when i am importing using @import "foundation"; or @import "foundation/components/topbar"; i am getting following error

error sass/screen.scss (Line 7: File to import not found or unreadable: foundation.
Load paths:
/media/oem/Python/Self programs/mycache/mycache/templates/mycss/sass
/usr/share/compass/frameworks/blueprint/stylesheets
/usr/share/compass/frameworks/compass/stylesheets
Compass::SpriteImporter)

config.rb文件

config.rb file

require 'foundation'
http_path = "/"
css_dir = "stylesheets"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts"

当我在config.rb文件中包含要求基础"后运行指南针手表时,我会收到以下错误消息

when i run compass watch after including require 'foundation' in config.rb file then i get following error

command->"compass watch --trace"给出

command--> "compass watch --trace" gives

LoadError on line ["36"] of /usr/lib/ruby/1.9.1/rubygems/custom_require.rb: cannot load such file -- foundation
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/lib/ruby/vendor_ruby/compass/configuration/data.rb:161:in `require'
/media/oem/Python/Self programs/mycache/mycache/templates/mycss/config.rb:4:in `get_binding'
/usr/lib/ruby/vendor_ruby/compass/configuration/serialization.rb:24:in `eval'
/usr/lib/ruby/vendor_ruby/compass/configuration/serialization.rb:24:in `parse_string'
/usr/lib/ruby/vendor_ruby/compass/configuration/serialization.rb:15:in `block in _parse'
/usr/lib/ruby/vendor_ruby/compass/configuration/serialization.rb:14:in `open'
/usr/lib/ruby/vendor_ruby/compass/configuration/serialization.rb:14:in `_parse'
/usr/lib/ruby/vendor_ruby/compass/configuration/file_data.rb:7:in `block in new_from_file'
/usr/lib/ruby/vendor_ruby/compass/configuration/inheritance.rb:204:in `with_defaults'
/usr/lib/ruby/vendor_ruby/compass/configuration/file_data.rb:6:in `new_from_file'
/usr/lib/ruby/vendor_ruby/compass/configuration/helpers.rb:42:in `configuration_for'
/usr/lib/ruby/vendor_ruby/compass/configuration/helpers.rb:97:in `add_project_configuration'                                                                              
/usr/lib/ruby/vendor_ruby/compass/commands/project_base.rb:31:in `add_project_configuration'                                                                              
/usr/lib/ruby/vendor_ruby/compass/commands/project_base.rb:25:in `configure!'                                                                                             
/usr/lib/ruby/vendor_ruby/compass/commands/project_base.rb:15:in `initialize'                                                                                             
/usr/lib/ruby/vendor_ruby/compass/commands/update_project.rb:37:in `initialize'                                                                                           
/usr/lib/ruby/vendor_ruby/compass/exec/sub_command_ui.rb:42:in `new'                                                                                                      
/usr/lib/ruby/vendor_ruby/compass/exec/sub_command_ui.rb:42:in `perform!'                                                                                                 
/usr/lib/ruby/vendor_ruby/compass/exec/sub_command_ui.rb:15:in `run!'                                                                                                     
/usr/bin/compass:30:in `block in <main>'                                                                                                                                  
/usr/bin/compass:44:in `call'                                                                                                                                             
/usr/bin/compass:44:in `<main>'

那么我现在该如何解决呢?

so now how can i solve these?

谢谢

推荐答案

来自官方网站:从Foundation 5开始,不再有Compass扩展程序.相反,我们使用Bower来使Foundation资产与您的项目保持最新.

From official site: Starting in Foundation 5 there's no longer a Compass extension. Instead we use bower to keep Foundation assets up to date with your project.

您将要更新config.rb文件夹,以将以下行更改为:

You'll want to update your config.rb folder to change this line from:

需要"zurb基础"至:add_import_path"bower_components/foundation/scss"

require "zurb-foundation" to: add_import_path "bower_components/foundation/scss"

更多信息在这里: http://foundation.zurb.com/docs/upgrading.html

这就是为什么指南针找不到基础

that's why compass can't find foundation

这篇关于@import“基础";Foundation5中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆