3

Currently it seems Heroku is determined to pre-compile assets when I push my code up to my instances.

This is great for production servers, however for my "RAILS_ENV=development" server, this causes issues, as I now get pages with all the JavaScript files served up individually from my asset manifest, and then another file with the same code all grouped up as the pre-compiled asset.

This cause my jquery datatables libraries to break, throwing popup errors, which I don't get on my local environment (development or production) or in my production Heroku instance.

Is there anyway to disable pre-compilation of assets on Heroku for development mode instances ? Or is there any reason why these aren't already disabled on development Heroku servers already ?

4

3 に答える 3

2

Herokuがpublic/assets/manifest.ymlファイルを検出した場合、Herokuはアセットをプリコンパイルしようとせず、自分でアセットを処理していると見なします。詳細については、http://devcenter.heroku.com/articles/rails31_heroku_cedarをご覧ください。

于 2012-01-21T13:58:46.707 に答える
0

ちなみに、Herokuは、読み取り専用のFSと、RailsアセットパイプラインがファイルをFSに書き込みたいという事実を回避するために、アセットをプリコンパイルする必要があります。私が提案できる唯一のことは、コンパイル時にアセットが壊れている理由を解明することです。

于 2012-01-21T13:33:38.110 に答える