Integrating Normalize.css with the rails asset pipeline

3.3k Views Asked by At

I followed the super simple direction on how to install the normalize-rails css reset gem outlined here https://github.com/markmcconachie/normalize-rails

but I keep getting error stating that

"couldn't find file 'normalize-rails'"

when I included

*= require normalize-rails in my application.css file. I ran bundle, bundle update etc, still no dice. Am I installing this incorrectly? What I'm doing wrong?

3

There are 3 best solutions below

0
The Lazy Log On BEST ANSWER

First, run the following command to see if the gem has been installed

bundle show normalize-rails

And remember to restart your server after installing new gem :)

0
Gagan Gami On

Check this Steps:

  1. Add gem 'normalize-rails' in your Gemfile
  2. Run bundle install command in your terminal
  3. Check gem is installed or not by running bundle show normalize-rails in your terminal
  4. restart your rails server
  5. Add *= require normalize-rails in your application.css file before *= require_tree .

If you missed any steps then check it...

NOTE: You must using Rails 3.1+

0
hardik On

We also facing the same issue while upgrading the rails version. solved using this reference.

instead using this //= require normalize-css to //= require normalize-css/normalize.scss