I became quite a fan of Zurbs latest Foundation (version 4). Now I’ve had a situation I wanted to use it within a Middleman app. The installation works mostly as it would for a Rails app and is well documented.
But when it comes to sprockets and load paths you likely fail requiring foundation in all.js:
//= require foundation // Is correct but will likely fail. |
This is because sprockets doesn’t know where the javascript files of foundation are located. You therefore have to manually set it in your config.rb:
foundation_path = Gem::Specification.find_by_name('zurb-foundation').gem_dir set :js_assets_paths, [File.join(foundation_path, 'js', 'foundation')] |



