application.css не работает - PullRequest
       0

application.css не работает

0 голосов
/ 06 февраля 2012

Вот мой application.css:

/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the top of the
 * compiled file, but it's generally better to create a new file per style scope.
 * 
 *= require bootstrap 
 *= require bootstrap-responsive 
 *= require style 

По какой-то причине ни один из моих стилей CSS не применяется.Когда я просматриваю исходный код и открываю application.css, файл точно такой же.Это не компилируется.Application.js компилируется просто отлично!

мой гемфайл: https://gist.github.com/1748054

Есть идеи?

РЕДАКТИРОВАТЬ: Исправлено путем добавления */

1 Ответ

0 голосов
/ 06 февраля 2012

Убедитесь, что у вас есть:

# Enable the asset pipeline
config.assets.enabled = true

установлено в вашем config/application.rb

Также это немного похоже на выстрел в темноте, но вам не нужна такая строка:

*=require_self

прежде всего. Я всегда использую импорт sass, чтобы добавить мои таблицы стилей с большей точностью. Так что мой будет выглядеть так:

/*
 *= require_self
 */
@import "bootstrap.css";
@import "bootstrap-responsive.css";
@import "style.css";

Тогда просто убедитесь, что ваш файл называется application.css.scss

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...