gpt4 book ai didi

css - rails : CSS won't change unless I precompile locally in development

转载 作者:行者123 更新时间:2023-12-02 08:45:14 25 4
gpt4 key购买 nike

除非我使用 rake assets:precompile 在本地预编译,否则当我在浏览器中查看它时,我的 CSS 不会改变。

关于如何消除这种行为的任何想法?您需要更多文件吗?

这是我的 development.rb :

Mobile::Application.configure do
# Settings specified here will take precedence over those in config/application.rb

# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false

# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true

# Show full error reports and disable caching
config.consider_all_requests_local = true
config.action_controller.perform_caching = false

# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false

# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log

# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin

# Do not compress assets
config.assets.compress = false

# Expands the lines which load the assets
config.assets.debug = true

end

谢谢!

最佳答案

删除 public/assets 文件夹。 public/assets 文件夹中的文件将优先于 app/assets 文件夹中的文件加载。

删除后,您应该可以使用 app/assets 中的文件进行本地开发。

关于css - rails : CSS won't change unless I precompile locally in development,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12925609/

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