0

我在 Heroku 上遇到了典型的错误,似乎解决方案是在本地预编译然后提交到 git。

ActionView::Template::Error (application.css isn't precompiled)

但是,我使用asset_sync 在Rackspace CloudFiles CDN 上拥有我的资产,并且它们编译得很好,所以我真的不想也必须将编译后的资产提交给git。

有什么解决办法吗?

4

1 回答 1

1

before you push your app to heroku run the following.

bundle exec rake assets:precompile

That will precompile all the necessary javascript and css.

If you are running the app on your computer after you precompile you will not see any css and js changes until you run.

bundle exec rake assets:clean

that will remove all precompiled files, you need to precompile every time you push your app.

于 2012-04-27T06:09:29.447 回答