【发布时间】:2016-02-06 20:22:10
【问题描述】:
我尝试将我的简单 Rails 应用程序部署到 Heroku。这个应用程序只是尝试将 bower 与 Heroku 一起使用。
不幸的是,我在 Heroku 上的预编译资产有问题。
这给了我错误Sprockets::FileNotFound。
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: rake aborted!
remote: Sprockets::FileNotFound: couldn't find file './app/App'
remote: (in /tmp/build_fe6dc0e2c0063705b279b26e4aa2432d/app/assets/javascripts/application.js:12)
我不知道可能是什么原因。 App.js 是我自己的文件,它肯定存在。
需要提到rake assets:precompile 在我的本地机器上正常工作。
这是我的applications.js,其中包括所有其他文件
//= require jquery
//= require jquery_ujs
//= require vendor/angular/angular
//= require vendor/angular-route/angular-route
//= require vendor/angular-resource/angular-resource
//= require vendor/angular-sanitize/angular-sanitize
//= require vendor/moment/moment
//= require vendor/angular-moment/angular-moment
//= require ./app/App
//= require ./app/router
//= require_tree ./app/controllers
//= require_tree ./app/directives
//= require_tree ./app/filters
在一些类似的问题中,我找到了运行heroku repo:purge_cache 的建议。
但这对我来说也失败了。
~/tmp/repo_tmp $ cd unpack
~/tmp/repo_tmp/unpack $ tar -zxf ../repo-cache.tgz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
所有源代码均在 GitHub 上发布 https://github.com/ivanovalexey/bowerrr
有人能帮我弄清楚吗? 谢谢。
【问题讨论】:
标签: heroku ruby-on-rails-3.2 asset-pipeline