gpt4 book ai didi

ruby-on-rails - Sprockets::CircularDependencyError in Store#index

转载 作者:数据小太阳 更新时间:2023-10-29 06:32:31 24 4
gpt4 key购买 nike

我正在遵循手册《使用 Rails 进行敏捷 Web 开发》第 4 版,但我在 rails 3.1 中遇到了 sprocket css 的问题。

代码css是:

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

如果我修改 app/assets/stylesheets/aplication.css.scss 的 css 代码,我会遇到下一个错误:

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'

我不明白为什么如果我修改 aplication.css.scss 中的边距值或填充值,例如我会收到此错误。

非常感谢。

最佳答案

您应该删除 app/assets/stylesheets/application.css。

关于ruby-on-rails - Sprockets::CircularDependencyError in Store#index,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7462661/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com