1

我正在尝试预编译并将我的文件推送到 CDN ......每个https://devcenter.heroku.com/articles/cdn-asset-host-rails31

但是,当我运行这个

heroku labs:enable user-env-compile -a <<my app>>

我收到以下错误

-----> Enabling user-env-compile for sleepy-castle-9766... failed
 !    Application error

日志:

2013-04-15T04:41:48.300161+00:00 app[web.1]:   Rendered posts/_vote.html.erb (38.3ms)
2013-04-15T04:41:48.300161+00:00 app[web.1]:   Rendered posts/_vote.html.erb (9.2ms)
2013-04-15T04:41:48.300161+00:00 app[web.1]:   Rendered posts/_vote.html.erb (67.5ms)
2013-04-15T04:41:48.300405+00:00 app[web.1]:   Rendered posts/_vote.html.erb (9.5ms)
2013-04-15T04:41:48.300405+00:00 app[web.1]:   Rendered posts/_vote.html.erb (38.9ms)
2013-04-15T04:41:48.299894+00:00 app[web.1]:   Rendered posts/_vote.html.erb (10.8ms)
2013-04-15T04:41:48.299894+00:00 app[web.1]:   Rendered posts/_vote.html.erb (94.8ms)
2013-04-15T04:41:48.299446+00:00 app[web.1]:   Rendered posts/_vote.html.erb (7.7ms)
2013-04-15T04:41:48.299894+00:00 app[web.1]:   Rendered posts/_vote.html.erb (7.9ms)
2013-04-15T04:41:48.300161+00:00 app[web.1]:   Rendered posts/_vote.html.erb (15.9ms)
2013-04-15T04:41:48.300405+00:00 app[web.1]:   Rendered posts/_vote.html.erb (9.0ms)
2013-04-15T04:41:48.300405+00:00 app[web.1]:   Rendered posts/_vote.html.erb (11.2ms)
2013-04-15T04:41:48.300405+00:00 app[web.1]:   Rendered posts/_vote.html.erb (28.0ms)
2013-04-15T04:41:48.300405+00:00 app[web.1]:   Rendered posts/_vote.html.erb (13.7ms)
2013-04-15T04:41:48.300656+00:00 app[web.1]:   Rendered posts/_vote.html.erb (6.8ms)
2013-04-15T04:41:48.300161+00:00 app[web.1]:   Rendered posts/_vote.html.erb (6.9ms)
2013-04-15T04:41:48.300161+00:00 app[web.1]:   Rendered posts/_vote.html.erb (16.6ms)
2013-04-15T04:41:48.300656+00:00 app[web.1]:   Rendered posts/_vote.html.erb (6.7ms)
2013-04-15T04:41:48.300656+00:00 app[web.1]:   Rendered posts/_vote.html.erb (6.6ms)
2013-04-15T04:41:48.300656+00:00 app[web.1]:   Rendered posts/_vote.html.erb (6.7ms)
2013-04-15T04:41:48.300890+00:00 app[web.1]:   Rendered layouts/_footer.html.erb (0.0ms)
2013-04-15T04:41:48.300656+00:00 app[web.1]:   Rendered posts/_vote.html.erb (6.4ms)
2013-04-15T04:41:48.300656+00:00 app[web.1]:   Rendered posts/_vote.html.erb (6.8ms)
2013-04-15T04:41:48.300656+00:00 app[web.1]:   Rendered posts/_vote.html.erb (6.4ms)
2013-04-15T04:41:48.300890+00:00 app[web.1]:   Rendered static_pages/_login.html.erb (0.0ms)
2013-04-15T04:41:48.300405+00:00 app[web.1]:   Rendered posts/_vote.html.erb (12.3ms)
2013-04-15T04:41:48.300890+00:00 app[web.1]:   Rendered static_pages/home.html.erb within layouts/application (1607.6ms)
2013-04-15T04:41:48.300890+00:00 app[web.1]: Completed 200 OK in 1613ms (Views: 769.4ms | ActiveRecord: 843.0ms)
2013-04-15T04:41:48.300405+00:00 app[web.1]:   Rendered posts/_vote.html.erb (10.1ms)
2013-04-15T04:41:48.300890+00:00 app[web.1]:   Rendered posts/_vote.html.erb (43.6ms)
2013-04-15T04:41:48.300405+00:00 app[web.1]:   Rendered posts/_post.html.erb (477.6ms)
2013-04-15T04:41:48.300890+00:00 app[web.1]:   Rendered posts/_post.html.erb (233.7ms)
2013-04-15T04:41:48.300656+00:00 app[web.1]:   Rendered posts/_vote.html.erb (6.9ms)
2013-04-15T04:41:48.300890+00:00 app[web.1]:   Rendered layouts/_header.html.erb (1.8ms)
2013-04-15T04:41:48.299894+00:00 app[web.1]:   Rendered posts/_vote.html.erb (45.0ms)
2013-04-15T04:41:48.300405+00:00 app[web.1]:   Rendered posts/_vote.html.erb (41.7ms)
2013-04-15T04:41:48.300656+00:00 app[web.1]:   Rendered posts/_vote.html.erb (7.2ms)
2013-04-15T04:41:48.299894+00:00 app[web.1]:   Rendered posts/_vote.html.erb (38.9ms)
2013-04-15T04:41:48.299894+00:00 app[web.1]:   Rendered posts/_vote.html.erb (40.2ms)
2013-04-15T04:41:48.300656+00:00 app[web.1]:   Rendered posts/_vote.html.erb (6.8ms)
2013-04-15T04:41:49.264569+00:00 heroku[router]: at=info method=GET path=/img/greenlogo.png host=www.imissyou.com fwd="76.98.253.94" dyno=web.1 connect=1ms service=6ms status=304 bytes=0
2013-04-15T04:41:49.289944+00:00 heroku[router]: at=info method=GET path=/img/homepagetopheader.png host=www.imissyou.com fwd="76.98.253.94" dyno=web.1 connect=1ms service=4ms status=304 bytes=0
2013-04-15T04:42:42.366874+00:00 app[web.1]: Started GET "/" for 95.211.87.85 at 2013-04-15 04:42:42 +0000
2013-04-15T04:42:43.722607+00:00 heroku[router]: at=info method=GET path=/ host=www.imissyou.com fwd="95.211.87.85" dyno=web.1 connect=1ms service=1355ms status=200 bytes=80024
2013-04-15T04:42:44.743673+00:00 app[web.1]:   Rendered posts/_vote.html.erb (8.4ms)
2013-04-15T04:42:44.743673+00:00 app[web.1]:   Rendered posts/_vote.html.erb (40.0ms)
2013-04-15T04:42:44.743673+00:00 app[web.1]: Processing by StaticPagesController#home as HTML
2013-04-15T04:42:44.743673+00:00 app[web.1]:   Rendered posts/_vote.html.erb (48.6ms)
2013-04-15T04:42:44.743673+00:00 app[web.1]:   Rendered posts/_vote.html.erb (55.0ms)
2013-04-15T04:42:44.744198+00:00 app[web.1]:   Rendered posts/_vote.html.erb (6.9ms)
2013-04-15T04:42:44.744198+00:00 app[web.1]:   Rendered posts/_vote.html.erb (7.6ms)
2013-04-15T04:42:44.744198+00:00 app[web.1]:   Rendered posts/_vote.html.erb (39.2ms)
2013-04-15T04:42:44.744198+00:00 app[web.1]:   Rendered posts/_vote.html.erb (8.5ms)
2013-04-15T04:42:44.744198+00:00 app[web.1]:   Rendered posts/_vote.html.erb (24.3ms)
2013-04-15T04:42:44.744198+00:00 app[web.1]:   Rendered posts/_vote.html.erb (5.4ms)
2013-04-15T04:42:44.744198+00:00 app[web.1]:   Rendered posts/_vote.html.erb (5.1ms)
2013-04-15T04:42:44.744198+00:00 app[web.1]:   Rendered posts/_vote.html.erb (5.4ms)
2013-04-15T04:42:44.744198+00:00 app[web.1]:   Rendered posts/_vote.html.erb (6.1ms)
2013-04-15T04:42:44.744453+00:00 app[web.1]:   Rendered posts/_vote.html.erb (7.6ms)
2013-04-15T04:42:44.744453+00:00 app[web.1]:   Rendered posts/_vote.html.erb (6.8ms)
2013-04-15T04:42:44.744453+00:00 app[web.1]:   Rendered posts/_vote.html.erb (5.4ms)
2013-04-15T04:42:44.744453+00:00 app[web.1]:   Rendered posts/_vote.html.erb (6.2ms)
2013-04-15T04:42:44.744198+00:00 app[web.1]:   Rendered posts/_vote.html.erb (8.1ms)
2013-04-15T04:42:44.744453+00:00 app[web.1]:   Rendered posts/_vote.html.erb (5.6ms)
2013-04-15T04:42:44.744453+00:00 app[web.1]:   Rendered posts/_vote.html.erb (6.4ms)
2013-04-15T04:42:44.744453+00:00 app[web.1]:   Rendered posts/_vote.html.erb (5.1ms)
2013-04-15T04:42:44.744453+00:00 app[web.1]:   Rendered posts/_vote.html.erb (7.3ms)
2013-04-15T04:42:44.744453+00:00 app[web.1]:   Rendered posts/_vote.html.erb (5.0ms)
2013-04-15T04:42:44.744698+00:00 app[web.1]:   Rendered posts/_vote.html.erb (39.6ms)
2013-04-15T04:42:44.744698+00:00 app[web.1]:   Rendered posts/_vote.html.erb (13.6ms)
2013-04-15T04:42:44.744698+00:00 app[web.1]:   Rendered posts/_vote.html.erb (29.2ms)
2013-04-15T04:42:44.744698+00:00 app[web.1]:   Rendered posts/_vote.html.erb (11.5ms)
2013-04-15T04:42:44.744698+00:00 app[web.1]:   Rendered posts/_vote.html.erb (6.9ms)
2013-04-15T04:42:44.744698+00:00 app[web.1]:   Rendered posts/_vote.html.erb (9.1ms)
2013-04-15T04:42:44.744453+00:00 app[web.1]:   Rendered posts/_post.html.erb (382.1ms)
2013-04-15T04:42:44.744698+00:00 app[web.1]:   Rendered posts/_vote.html.erb (44.8ms)
2013-04-15T04:42:44.744698+00:00 app[web.1]:   Rendered posts/_post.html.erb (268.4ms)
2013-04-15T04:42:44.744943+00:00 app[web.1]:   Rendered posts/_vote.html.erb (5.7ms)
2013-04-15T04:42:44.744943+00:00 app[web.1]:   Rendered posts/_vote.html.erb (8.8ms)
2013-04-15T04:42:44.744943+00:00 app[web.1]:   Rendered posts/_vote.html.erb (63.7ms)
2013-04-15T04:42:44.744943+00:00 app[web.1]:   Rendered posts/_vote.html.erb (38.4ms)
2013-04-15T04:42:44.744943+00:00 app[web.1]:   Rendered posts/_vote.html.erb (6.0ms)
2013-04-15T04:42:44.744943+00:00 app[web.1]:   Rendered posts/_vote.html.erb (16.8ms)
2013-04-15T04:42:44.744943+00:00 app[web.1]:   Rendered posts/_vote.html.erb (9.0ms)
2013-04-15T04:42:44.744943+00:00 app[web.1]:   Rendered posts/_vote.html.erb (7.3ms)
2013-04-15T04:42:44.744943+00:00 app[web.1]:   Rendered posts/_vote.html.erb (7.2ms)
2013-04-15T04:42:44.745185+00:00 app[web.1]:   Rendered posts/_vote.html.erb (7.1ms)
2013-04-15T04:42:44.745185+00:00 app[web.1]:   Rendered posts/_vote.html.erb (7.8ms)
2013-04-15T04:42:44.745185+00:00 app[web.1]:   Rendered posts/_vote.html.erb (8.1ms)
2013-04-15T04:42:44.745185+00:00 app[web.1]:   Rendered posts/_post.html.erb (273.0ms)
2013-04-15T04:42:44.744698+00:00 app[web.1]:   Rendered posts/_vote.html.erb (6.9ms)
2013-04-15T04:42:44.744698+00:00 app[web.1]:   Rendered posts/_vote.html.erb (42.9ms)
2013-04-15T04:42:44.745185+00:00 app[web.1]:   Rendered static_pages/home.html.erb within layouts/application (1333.4ms)
2013-04-15T04:42:44.745185+00:00 app[web.1]:   Rendered static_pages/_login.html.erb (0.0ms)
2013-04-15T04:42:44.745185+00:00 app[web.1]:   Rendered layouts/_header.html.erb (2.2ms)
2013-04-15T04:42:44.745438+00:00 app[web.1]:   Rendered layouts/_footer.html.erb (0.0ms)
2013-04-15T04:42:44.745438+00:00 app[web.1]: Completed 200 OK in 1339ms (Views: 750.7ms | ActiveRecord: 587.7ms)
2013-04-15T04:42:44.745185+00:00 app[web.1]:   Rendered posts/_vote.html.erb (6.4ms)
2013-04-15T04:42:44.745185+00:00 app[web.1]:   Rendered posts/_vote.html.erb (11.0ms)
2013-04-15T04:42:44.744943+00:00 app[web.1]:   Rendered posts/_vote.html.erb (7.2ms)
2013-04-15T04:42:44.745185+00:00 app[web.1]:   Rendered posts/_vote.html.erb (37.0ms)
4

1 回答 1

2

我在asset_sync github页面上找到了运行命令时的文档:

heroku labs:enable user-env-compile --app <appname>

为了让它工作。

Heroku 也有 AssetSync https://devcenter.heroku.com/articles/cdn-asset-host-rails31#configuration文档

现在只编译一次资产真是太好了

当我想直接部署到 Heroku 时,这也适用于我。我使用需要的i18n -js https://github.com/fnando/i18n-js gemconfig.assets.initialize_on_precompile = trueapplication.rb.

所以,这个命令让我不必在部署之前预编译资产。我真的帮助 Heroku 保持这一点。

我们也叫 heroku labs:enable user-env-compile -a <appname>,而不是 user_env_compile。

编辑: 为了解决这个问题,只需更新你的heroku toolbelt,请参考下面提到的链接 https://blog.heroku.com/archives/2012/10/15/upgrading-to-the-heroku-toolbelt

于 2013-04-15T06:23:07.563 回答