Rails 3.1 assets has no fingerprint in production

后端 未结 1 1482
野趣味
野趣味 2021-01-12 02:10

Just started to adapted to rails 3.1, I started to write coffeescript and sass and everything works fine in development. When I run the server in production, I only get:

相关标签:
1条回答
  • 2021-01-12 02:40

    Check that you have the pipeline turned on in application.rb:

    config.assets.enabled = true

    Are you using the correct helper methods for writing the tags? The helper methods should not have the /styleheets and /javascript in the path. Like this (inside erb):

    javascript_include_tag "application"
    stylesheet_link_tag "application"
    

    You will also need to run the precompile task as part of the deploy processs to create the files, since you've set compile to false.

    The asset pipeline guide shows how to set this up with capistrano.

    0 讨论(0)
提交回复
热议问题