ensure you can run `$ bundle exec rake -P` against your app with no environment variables present
and using the production group of your Gemfile.
This may be intentional, if you expected rake tasks to be run
cancel the build (CTRL+C) and fix the error then commit the fix:
rake aborted!
Run Code Online (Sandbox Code Playgroud)
我没有任何我想自动运行的rake任务.我应该忽略这个警告吗?
自 2013 年 12 月 5 日起,Heroku 添加了使用 Ruby 构建包进行部署的调试输出。
错误被触发:
assets:precompile任务不存在或者这是违反直觉的,因为应用程序永远不会在没有配置变量的情况下运行,但Heroku 的构建过程在没有配置变量的情况下执行。
根据错误消息,确保在推送到 Heroku 之前可以bundle exec rake -P RAILS_ENV=production 在没有环境变量的情况下运行(例如,在运行上述命令时注释掉环境变量)。
另外,请放心,该rake开关-P是无害的,因此您可以随意运行它,直到解决此问题。此开关用于显示所有任务及其直接先决条件的列表。如果您想仔细检查,请参阅Rake 命令行用法。输出可能有多200行,看起来像这样:
rake about
environment
rake assets:clean
environment
rake assets:clobber
environment
rake assets:environment
rake assets:precompile
environment
rake db:_dump
...
rake tmp:pids:clear
rake tmp:sessions:clear
rake tmp:sockets:clear
Run Code Online (Sandbox Code Playgroud)
您还可以尝试启用 user-env-compile
heroku labs:enable user-env-compile
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5268 次 |
| 最近记录: |