0

我遵循了关于如何安装此处概述的 normalize-rails css reset gem 的超级简单的指导 https://github.com/markmcconachie/normalize-rails

但我不断收到错误说明

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

当我包括

*= require normalize-rails 在我的application.css文件中。我跑了bundlebundle update等等,仍然没有骰子。我安装不正确吗?我做错了什么?

4

2 回答 2

4

检查此步骤:

  1. 添加gem 'normalize-rails'你的 Gemfile
  2. bundle install在终端中运行命令
  3. bundle show normalize-rails 通过在终端中运行检查 gem 是否安装
  4. 重启你的 Rails 服务器
  5. *= require normalize-rails在您的application.css文件中添加之前*= require_tree .

如果您错过了任何步骤,请检查它...

注意:您必须使用Rails 3.1+

于 2014-09-05T06:18:42.143 回答
1

首先,运行以下命令查看gem是否已经安装

bundle show normalize-rails

并记住在安装新 gem 后重新启动服务器 :)

于 2014-09-05T06:07:27.440 回答