Installing Zurb Foundation gem on Ruby on Rails


HI guys, today I am going to list down the steps on how to install foundation (http://foundation.zurb.com/) for a ruby on rails projects.

1. Go to your rails project folder and open the Gemfile. And add the following line,

gem <span class="string">'foundation-rails'</span>

2. then go to terminal and run the following command from your project folder,

rails g foundation:install

This should add foundation into your project. More info on the installation can be found here. But like me if you get an error when you go to your project on the browser saying,

Invalid CSS after "...ules: $modules ": expected "}", was "!global;"

you might want to do some adjustments, because above error is caused by a sass version included in ruby on rails by default and the sass version on foundation being mismatched. So you might want to specify an earlier version of foundation like following on your GemFile,

gem 'sass-rails', '&gt;= 4.0.4'

gem 'foundation-rails', '5.4.5'

More info on fixing this error can be found here.

Advertisements

Let me know what you think .. :)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s