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
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.
rails g foundation:install to configure your application to use Foundation. That's it!
Append the following line to your
/*= require foundation */
If you're planning on using Sass then you'll want to rename
application.scss. That file should then look like:
Append the following lines to your
//= require foundation $(document).foundation();
Make sure that Modernizr is included in the
<head> of your page:
Add the following line to the <head> of your page layout:
<meta name="viewport" content="width=device-width, initial-scale=1.0" />