gem 'bootstrap-sass'
gem 'select2-rails'
gem 'select2-sass-bootstrap-rails'
gem 'bootstrap-datepicker-rails'
gem 'pnotify-rails'
gem 'jquery-placeholder-rails'
//= require jquery
//= require jquery_ujs
//= require jquery.ui.datepicker
//= require jquery-placeholder
//= require bootstrap-datepicker/core
//= require bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN
//= require kindeditor
//= require wice_grid
//= require select2
//= require select2_locale_zh-CN
//= require bootstrap
//= require pnotify
//= require highcharts/highcharts
//= require highcharts/highcharts-more
//= require highcharts/highstock
//= require bootstrap-wysihtml5
//= require bootstrap-wysihtml5/locales/zh-CN
//= require_tree ../../../vendor/assets/javascripts/.
//= require_tree .
<script src="http://s1.bdstatic.com/r/www/cache/ecom/esl/1-6-6/esl.js"></script>
我用了好多好多 js
但是经常在 production 环境下部署的时候 js 不生效
每次我都会删除public\assets
文件下后重新执行bundle exec rake assets:precompile
然后重启 nginx
以下是我的config\environments\production.rb
,求帮助谢谢
# Code is not reloaded between requests
config.cache_classes = true
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = true
# Compress JavaScripts and CSS
config.assets.compress = false
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = true
# Generate digests for assets URLs
config.assets.digest = true
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found)
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify