Menu icon Foundation
Foundation 5 SASS installation won't compile on Windows or Mac

I've been unable to get the SASS installation to compile either in Windows using Prepros or on Mac using Codekit.

The Foundation install seems to have gone fine on both platforms and I can see the index.html page with no styling as there's no CSS yet.

When I try compiling in Prepros on Windows 7, it reports:

Syntax error: File to import not found or unreadable: foundation.
Load paths:
C:/Users/Neon/Sites/zurb-5/scss
C:/Users/Neon/Sites/zurb-5/scss
C:/Program Files (x86)/Prepros/gems/gems/bourbon-3.1.8/app/assets/stylesheets
C:/Program Files (x86)/Prepros/gems/gems/neat-1.4.0/app/assets/stylesheets
on line 2 of C:\Users\Neon\Sites\zurb-5\scss\app.scss

When I try on Mac OS X Mavericks, Codekit reports:

Compass was unable to compile one or more files in the project:

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: illegal switch in RUBYOPT: -E (RuntimeError)

Screen shot 2013 12 10 at 20.33.32

Screen shot 2013 12 10 at 20.36.48

installationinstallFoundation 5compileSass

I've been unable to get the SASS installation to compile either in Windows using Prepros or on Mac using Codekit.

The Foundation install seems to have gone fine on both platforms and I can see the index.html page with no styling as there's no CSS yet.

When I try compiling in Prepros on Windows 7, it reports:

Syntax error: File to import not found or unreadable: foundation.
Load paths:
C:/Users/Neon/Sites/zurb-5/scss
C:/Users/Neon/Sites/zurb-5/scss
C:/Program Files (x86)/Prepros/gems/gems/bourbon-3.1.8/app/assets/stylesheets
C:/Program Files (x86)/Prepros/gems/gems/neat-1.4.0/app/assets/stylesheets
on line 2 of C:\Users\Neon\Sites\zurb-5\scss\app.scss

When I try on Mac OS X Mavericks, Codekit reports:

Compass was unable to compile one or more files in the project:

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: illegal switch in RUBYOPT: -E (RuntimeError)

Screen shot 2013 12 10 at 20.33.32

Screen shot 2013 12 10 at 20.36.48

This post has been closed. No new replies can be added.

Feather Light over 5 years ago

Hello PETER GIBB,
I think the notice there, was able to explain to you, about your Mistake
"File to import not found or unreadable"

First, check your ruby, gem or other system requirements is running well
And then, check your spesific asset in your config.rb file is already loaded, and readable File Permisions
See if scss folder already exist and your scss file is readable

Open your config.rb file and see :

add_import_path "bower_components/foundation/scss"
http_path = "/"
css_dir = "css"
sass_dir = "scss"
images_dir = "images"
javascripts_dir = "javascripts"

Thanks

Peter Gibb over 5 years ago

Thanks for your suggestions.

I've got Foundation compiling on Mac now. It turned out that while I'd followed the install instructions, the sass and compass gems were missing. Once I installed them, Codekit compiled okay.

Still not working on Windows though. I've compared the local gems with those on the working Mac and everything seems okay.

I've added a backtrace and it generates the CSS file with the following output, though I'm no closer to figuring out why it can't see Foundation (The add_import_path "bower_components/foundation/scss" line is in the config.rb file).

/*
Syntax error: File to import not found or unreadable: foundation.
Load paths:
c:/projects/zurbTest2
c:/projects/zurbTest2/scss
on line 2 of scss/app.scss

1: @import "settings";
2: @import "foundation";

Backtrace:
scss/app.scss:2
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/import_node.rb:67:in rescue in import'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/import_node.rb:45:in
import'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/import_node.rb:28:in imported_file'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/import_node.rb:37:in
css_import?'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:217:in visit_import'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in
visit'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:100:in visit'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in
block in visit_children'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in map'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in
visit_children'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:109:in block in visit_children'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:121:in
with_environment'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:108:in visit_children'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in
block in visit'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:128:in visit_root'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in
visit'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:100:in visit'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:7:in
visit'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/root_node.rb:20:in render'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/engine.rb:315:in
_render'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/engine.rb:262:in render'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/plugin/compiler.rb:362:in
update_stylesheet'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/plugin/compiler.rb:203:in block in update_stylesheets'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/plugin/compiler.rb:201:in
each'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/plugin/compiler.rb:201:in update_stylesheets'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/plugin/compiler.rb:283:in
block in watch'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/vendor/listen/lib/listen/multi_listener.rb:108:in call'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/vendor/listen/lib/listen/multi_listener.rb:108:in
on_change'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/vendor/listen/lib/listen/multi_listener.rb:117:in block in initialize_adapter'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/vendor/listen/lib/listen/adapters/polling.rb:56:in
call'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/vendor/listen/lib/listen/adapters/polling.rb:56:in poll'
c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.2.12/vendor/listen/lib/listen/adapters/polling.rb:32:in
block in start'
*/
body:before {
white-space: pre;
font-family: monospace;
content: "Syntax error: File to import not found or unreadable: foundation.\A Load paths:\A c:/projects/zurbTest2\A c:/projects/zurbTest2/scss\A on line 2 of scss/app.scss\A \A 1: @import \"settings\";\A 2: @import \"foundation\";"; }

Peter Gibb over 5 years ago

After investigation, I think the problem may be related to the installation of GIT on Windows.

In the scss folder, if alongside the app.scss and _settings.scss files, I create an empty _foundation.scss file, the project compiles (It's empty, but it at least compiles). This would seem to point to the configuration being the issue in that the _foundatuon.scss file in bower_components isn't being picked up.

What's not clear is that if GIT, Ruby or NodeJS need to be installed with anything other than the default settings, what the settings need to be.

Peter Gibb over 5 years ago

I've managed to resolve this to install and compile Foundation 5 on Windows from behind a corporate firewall. The issue was a combination of Git and Ruby install options and a closed Git port 8419.

For anyone else with no prior Ruby or Git experience, here's what worked for me:

Zurb Foundation 5 - SASS Windows installation

INSTALLING GIT

Check if you have GIT installed by opening CMD.EXE and entering:

git —version

If GIT is not installed, go to http://git-scm.com/downloads, download and install it.

Ensure when installing GIT that you select the checkbox to run GIT from the Windows command prompt.

Select Checkout as-is, commit as-is option for line endings.

INSTALLING RUBY

Make sure you have Ruby 1.9+ installed (v2.0 has been installed in working tests)

In CMD.EXE, type:

ruby —version

If this returns less than ruby 1.9 or isn’t found, go to http://rubyinstaller.org/downloads and download the appropriate version of RubyInstaller

When installing Ruby, make sure you select the option to Add Ruby executables to your PATH

INSTALLING NODEJS

Make sure you have NodeJS installed
In CMD.EXE type:

node —version

If this isn’t found, go to http://nodejs.org/download and download the appropriate installer.

CONFIGURING FOUNDATION INSTALLATION

In CMD.EXE, to work around the closed Proxy GIT port (8419) enter:

git config --global url."https://".insteadOf git://

In CMD.EXE enter:
npm install -g bower grunt-cli

In CMD.EXE enter:
gem install foundation

In CMD.EXE go to the working area where you want to create your project.
Create the project by typing:

foundation new PROJECT-NAME