3
votes

I Installed Foundation like this in the terminal:

[sudo] gem install zurb-foundation

Then I created a new Project like this:

cd path/to/where-you-want-your-project 
compass create <project-name> -r zurb-foundation --using foundation

(Exactely like the Foundation docs)

Now because I'm lazy I don't want to hit compass watch path/to/project everytime I switch between projects.

When I set LiveReload to Compile my sass Files the following Error appears:

[31m[0m[31m error[0m sass/app.scss (Line 5: File to import not found or unreadable: foundation. Load paths: /Volumes/HDD/htdocs/static_sites/static_ruegg/sass /Applications/LiveReload.app/Contents/Resources/SASS.lrplugin/lib/compass/frameworks/blueprint/stylesheets /Applications/LiveReload.app/Contents/Resources/SASS.lrplugin/lib/compass/frameworks/compass/stylesheets /Applications/LiveReload.app/Contents/Resources/SASS.lrplugin/lib/ZURB-foundation/stylesheets Compass::SpriteImporter) [31m[0m

I don't understand this. What do I have to change in order to Work with LiveRealod?

Thanks for any help

2

2 Answers

5
votes

To avoid modifying the LiveReload.app you can also provide the absolute path to your zurb-foundation gem in the project config.rb file. LiveReload will then use that version.

For example:

instead of

require "curb-foundation";

use

require "/Library/Ruby/Gems/1.8/gems/zurb-foundation-3.1.1/lib/zurb-foundation.rb" 

in your config.rb file.

3
votes

I had the same problem. Unnerving.

After some research I discovered that LiveReload (I'm using version 2.3.18) includes its own set of gems inside /Applications/LiveReload.app/Contents/Resources/SASS.lrplugin/lib and that this set is different from the one that gets installed with Foundation 3.0.9. Not only on the dependencies but also in the contents.

To allow LiveReload to work properly I went to /Applications/LiveReload.app/Contents/Resources/SASS.lrplugin/lib, substituted the offending existing gem folders for symbolic links to the corresponding ones in my gems repository, and added symbolic links for those present in my gems repository but not in the LiveReload set.

So, summarizing, with zurb-foundation gem and LiveReload app installed I have done:

cd /Applications/LiveReload.app/Contents/Resources/SASS.lrplugin/lib

rm -Rf zurb-foundation
ln -s ~/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.9 zurb-foundation

rm -Rf sass
ln -s ~/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1 sass

rm -Rf compass
ln -s ~/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2 compass

rm -Rf chunky_png/
ln -s ~/.rvm/gems/ruby-1.9.3-p194/gems/chunky_png-1.2.6 chunky_png

ln -s ~/.rvm/gems/ruby-1.9.3-p194/gems/modular-scale-1.0.2 modular-scale

ln -s ~/.rvm/gems/ruby-1.9.3-p194/gems/sassy-math-1.2 sassy-math

ln -s /.rvm/gems/ruby-1.9.3-p194/gems/fssm-0.2.9 fssm

Where ~/.rvm/gems/ruby-1.9.3-p194/gems/ is the path to my default gems repository. If you don't know your gems repository paths you can note them by running gem environment.

After that, everything seems to work ok.