我和Heroku一起遇到了麻烦。它现在似乎正在编译CSS,但仍然没有编译JS。我使用的是Foundation 5和Rails 4.有什么想法吗?
production.rbconfig.serve_static_assets = false
config.assets.precompile += %w( vendor/modernizr.js )
config.assets.js_compressor = :uglifier
config.assets.css_compressor = :sass
config.assets.compile = true
config.assets.digest = true`
的application.js
//= require jquery
//= require foundation
//= require jquery_ujs
//= require jquery.validate
//= require jquery.lockfixed
//= require sticky_footer
//= require list
//= require foundation.slider
//= require landing
//= require handlebars
//= require landing
//= require foundation.abide
$(function(){ $(document).foundation(); });
答案 0 :(得分:1)
您可能已将资产投入git仓库。
你可以
# add assets to git ignore
echo "public/assets" >> .gitignore
# remove them from your git repo and from public
git rm -rf public/assets
# update your repo
git add public
git commit -m "Removed assets from repo"
# push to heroku again
git push heroku master