在编译资产后,我制作了一个 Rails 应用程序并部署到 Heroku。但是,既然我已经编译了一次资产,如果我想对本地主机上的 javascript 进行更改,我每次都必须重新编译资产,否则新的 javascript 无法正确注册并且我看不到更改在本地主机上,这使得开发非常缓慢,因为我必须等待它为每次更改进行编译。
有没有我可以添加的设置来避免这个问题?
这些是我的环境/development.rb 文件中的设置。
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