您好,我在公共目录中有资产(因为简单)
在我加载的布局中
<link href="/bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="/assets/css/jumbotron.css" rel="stylesheet">
<link href="/assets/css/application.css" rel="stylesheet">
在开发中它运行良好,但在生产资产中没有加载。
我的发展.rb
Web::Application.configure do
config.cache_classes = false
config.whiny_nils = true
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
config.action_mailer.raise_delivery_errors = false
config.active_support.deprecation = :log
config.action_dispatch.best_standards_support = :builtin
config.active_record.mass_assignment_sanitizer = :strict
config.active_record.auto_explain_threshold_in_seconds = 0.5
config.assets.compress = false
config.assets.debug = true
end
我的生产.rb
Web::Application.configure do
config.cache_classes = false
config.consider_all_requests_local = true # default false, zobrazuje errory
config.action_controller.perform_caching = false # default true
config.serve_static_assets = false
config.assets.compress = true
config.assets.compile = true # default false
config.assets.digest = true
config.i18n.fallbacks = true
config.active_support.deprecation = :notify
end