I was building a Rails engine that uses zurb-foundation's stylesheets, and kep hitting the same Sass::Syntax error. This seemed strange because I had followed the same procedure in a Rails application and it was worked on the first try. So I decided to zero in on the isse by starting two new rails projects--one application and one engine--and configure them to use foundation with a minimal amount of setup.
I started with 2 clean Rails 3.2.9 projects--one application and one engine --full
and configured them both manually for foundations by adding foundation_and_overrides.scss and require
-ing it in the CSS manifest.
I then creating a bare-bones controller so I'd have a page to load. For the application, loading that page and looking at the page source, I can see that foundation CSS was compiled correctly and loaded.
When I tried the same thing for the engine, I got this error:
Sass::SyntaxError in Main#index
Showing /<PLUGIN_PATH>/test/dummy/app/views/layouts/application.html.erb where line #5 raised:
File to import not found or unreadable: foundation/common/ratios.
Load path: /<PLUGIN_PATH>/test/dummy
(in /<PLUGIN_PATH>/app/assets/stylesheets/example_plugin/foundation_and_overrides.scss)
(Note that the dummy app's CSS manifest is require
-ing the plugin's CSS manifest, which is require
-ing foundation_and_overrides.scss. The wiring is clearly not the issue because the error is raised from foundation_and_overrides.scss)
I tried this with several builds of Ruby-1.9.3 (p125, 194, p327, I think) with the same results.
It still didn't work when I added this line to test/dummy/config/application.rb:
config.assets.paths << "#{Foundation::Engine.root}/scss"
even though foundation/common/_ratios.scss exists at that path.
The issue may be with Sass, Sprockets, Compass, Foundation or Rails, so I don't know where to go from here.
I reported it as an issue with Foundation, but I'm not so convinced of that.
Has anyone seen this before?