@import “foundation”; error in foundation5

淺唱寂寞╮ 提交于 2020-01-24 05:30:32

问题


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 file

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

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

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?

thanks


回答1:


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.

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

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

More information here: http://foundation.zurb.com/docs/upgrading.html

that's why compass can't find foundation



来源:https://stackoverflow.com/questions/20539475/import-foundation-error-in-foundation5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!