Zębatki:: koło zębate w sklepie # index

Śledzę manual Agile Web Development with Rails 4th edition i mam problem z css w rails 3.1.

Kod css to:

Http://media.pragprog.com/titles/rails4/code/rails31/depot_e/app/assets/stylesheets/application.css.scss

Jeśli zmodyfikuję kod css aplikacji / zasobów / arkuszy stylów / aplikacji.css.scss wyłapuję następny błąd:

Sprockets::CircularDependencyError in Store#index

Showing /home/ubuntu/Desktop/Depot/app/views/layouts/application.html.erb where line #5 raised:

/home/ubuntu/Desktop/Depot/app/assets/stylesheets/application.css.scss has already been required
Extracted source (around line #5):

2: <html>
3: <head>
4:   <title>Pragprog Books Online Store</title>
5: <%= stylesheet_link_tag "application" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tag %>
8: </head>
Rails.root: /home/ubuntu/Desktop/Depot

Application Trace | Framework Trace | Full Trace
app/views/layouts/application.html.erb:5:in`_app_views_layouts_application_html_erb___1008723970_81658620'

Nie rozumiem, dlaczego zmieniam wartość marginesu lub wartość padding w aplikacji.css.scss na przykład dostaję ten błąd.

Dziękuję bardzo.
Author: hyperrjas, 2011-09-18

4 answers

Należy usunąć app / assets/stylesheets / application.css.

 52
Author: Luca Invernizzi,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2011-10-02 21:45:55

Miałem podobny problem:
Asset pipeline not precompiling sass

Okrężna zależność występuje, gdy plik manifest wymaga plików drzewa. Sass i tak to robi, więc to nie jest konieczne.

Usunąć:

 *= require_tree .
 14
Author: Rimian,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2017-05-23 12:09:11

Miałem ten sam problem po zainstalowaniu SCSS. Naprawiłem problem, usuwając komentarze defult, które rails umieszcza w nagłówku. Więc to:

/*
 * 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_self
 *= require_tree .
*/

#wrapper {
    width: 980px;
    margin: 0 auto;
}

Stał się tym:

#wrapper {
    width: 980px;
    margin: 0 auto;
}
 2
Author: Ken,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2012-01-02 17:54:21

Wystarczy podać nazwę aplikacji.css jako " aplikacja.scss". To rozwiąże twój problem.

 0
Author: NAVPREET SINGH,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2015-03-14 17:28:04