First you'll want to add the following gems to the assets group in your Gemfile like so:
group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1' gem 'uglifier', '>= 1.0.3' # Add Foundation Here gem 'zurb-foundation', '~> 4.0.0' end
Then run bundle install to finish installing Foundation.
NOTE: Make sure that your restart your server after running bundle install. Otherwise the asset pipeline may not recognize the new Foundation files.
Simply run rails g foundation:install to configure your application to use Foundation. That's it!
Append the following line to your app/assets/stylesheets/application.css file:
/*= require foundation */
If you're planning on using Sass then you'll want to rename application.css to application.scss. That file should then look like:
@import "foundation";
Append the following lines to your app/assets/javascripts/application.js file:
//= require foundation $(document).foundation();
Make sure that Modernizr is included in the <head> of your page:
javascript_include_tag "vendor/custom.modernizr"
Add the following line to the <head> of your page layout:
<meta name="viewport" content="width=device-width, initial-scale=1.0" />