rails应用程序不会在生产环境中加载css/js/images

Ari*_*n L 3 css production-environment ruby-on-rails-3

当我在生产模式下运行我的rails应用程序时,图像不会显示而css在我的控制台中无法正常工作我收到消息 ActionController :: RoutingError(没有路由匹配"/stylesheets/theme.css"):呈现C:/ Ruby192/lib /ruby/gems/1.9.1/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/routing_error.erb救援/布局(0.0ms) 但在我的视图/布局application.html.erb我包含行<%= stylesheet_link_tag'主题'%>,theme.css出现在public/stylesheet文件夹中

ste*_*och 5

config/production.rb中进行以下更改

更改:

config.serve_static_assets = false
Run Code Online (Sandbox Code Playgroud)

至:

config.serve_static_assets = true
Run Code Online (Sandbox Code Playgroud)

我保证会解决这个问题