我想像Rails那样在Yii中设置资产编译和缩小。 http://www.yiiframework.com/doc-2.0/guide-structure-assets.html为什么Heroku看不到我部署后创建的文件?
我正在考虑使用PHP minifier。我宁愿不必手动编译并检入资产到Git中。然而,即使它工作,Heroku似乎也不会服务于不在Git中的新文件。为什么?
>heroku run bash
Running `bash` attached to terminal... up, run.6857
~ $ cd web
cd web
~/web $ ls
ls
MySample.php css images index.php robots.txt
assets favicon.ico index-test.php js
~/web $ echo hello > hello.txt
echo hello > hello.txt
~/web $ cat hello.txt
cat hello.txt
hello
~/web $ exit
exit
exit
$ curl -I http://xxxxxx.herokuapp.com/hello.txt
HTTP/1.1 404 Not Found
我已经知道Heroku使用临时文件系统。我不需要保存已编译的资产,因为它们可以在第一次请求时生成。 – Chloe 2015-04-01 23:39:31