heroku推送Rails 3.2应用时突然出现 "无法检测到RACK任务 "的情况(无其他错误)。

问题描述 投票:0回答:1

我换了 毫无 配置中(没有新的宝石或版本变化);只有一行代码,但我现在无法推送到heroku。一定是heroku发生了什么变化?

是Rails 3.2.22.5;Ruby 2.3.1。(是的,我正在升级到Rails 5,但这是一项巨大的工作,同时我还需要维护现有的生产系统。)

RAILS_ENV=production bundle exec rake -P工作正常。我不认为这真的是rake的问题。我最好的猜测是heroku发生了一些变化,我所拥有的某些版本不再支持,但我不知道是什么。而且我没有得到任何信息错误信息。

在损失... 我广泛地上网搜索,但大多数帖子都是4年多前的。我试过在本地预编译,只检查清单文件。我试着升级rake(从13.0.0升级到13.0.1),由于没有任何工作,所以把所有东西都放回去了。

remote:        Bundle complete! 54 Gemfile dependencies, 118 gems now installed.
remote:        Gems in the groups development and test were not installed.
remote:        Bundled gems are installed into `./vendor/bundle`
remote:        Bundle completed (0.51s)
remote:        Cleaning up the bundler cache.
remote: -----> Writing config/database.yml to read from DATABASE_URL
remote: -----> Installing node-v12.16.2-linux-x64
remote: -----> Detecting rake tasks
remote: 
remote:  !
remote:  !     Could not detect rake tasks
remote:  !     ensure you can run `$ bundle exec rake -P` against your app
remote:  !     and using the production group of your Gemfile.
remote:  !     bash: /tmp/build_785c3bf77f08cff81f442938e3386876/bin/rake: /app/vendor/ruby-2.3.1/bin/ruby: bad interpreter: No such file or directory
remote:  !
remote: /tmp/buildpackvv7B3/lib/language_pack/helpers/rake_runner.rb:106:in `load_rake_tasks!': Could not detect rake tasks (LanguagePack::Helpers::RakeRunner::CannotLoadRakefileError)
ruby-on-rails git heroku ruby-on-rails-3.2 rake
1个回答
0
投票

我问了heroku支持,他们找到了问题所在。正如我所预料的那样,与 rake 或我的项目本身无关(因为我什么都没改)。

它与构建包有关。我需要一个PDF生成器,所以我设置了一个 "多构建包"(多年前做的),显然是以一种不再支持的方式。我相信近因是指向一个 "主 "buildpack,而不是稳定版。所以有人在heroku检查了一些东西,它破坏了我的项目:) 这可能只会影响那些多年前在旧的雪松堆栈上做过设置的人,就像我一样。

我跑了。

heroku buildpacks:remove https://github.com/heroku/heroku-buildpack-multi.git
heroku buildpacks:add heroku/ruby
heroku buildpacks:add https://github.com/dscout/wkhtmltopdf-buildpack.git

然后又可以部署了!

© www.soinside.com 2019 - 2024. All rights reserved.