我的application.js
文件如下所示:
//= require jquery
//= require jquery_ujs
//= require rails.validations
//= require_tree .
我的开发站点在源代码中有这个:
<script src="/assets/jquery.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery_ujs.js?body=1" type="text/javascript"></script>
<script src="/assets/rails.validations.js?body=1" type="text/javascript"></script>
<script src="/assets/home.js?body=1" type="text/javascript"></script>
<script src="/assets/industries.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery-1.7.1.min.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery.ba-hashchange-v1.3.min.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery.flexslider-v1.8.min.js?body=1" type="text/javascript"></script>
<script src="/assets/main-r6.js?body=1" type="text/javascript"></script>
<script src="/assets/welcome.js?body=1" type="text/javascript"></script>
<script src="/assets/application.js?body=1" type="text/javascript"></script>
但我的作品是这样的:
<script src="/assets/application-b5f7c629f9622da89d5cc703e459e6c3.js" type="text/javascript"></script>
我的config/environments/development.rb
有这个:
config.assets.compress = false
我的config/environments/production.rb
有这个:
config.serve_static_assets = false
config.assets.compress = true
config.assets.compile = true
config.assets.digest = true
想法?