Heroku Push在加载共享库时出现Ruby Rails App错误,文件太短

时间:2018-05-30 19:09:19

标签: ruby-on-rails heroku

我试图将我的rails应用程序的新版本推送到我的Heroku帐户,该帐户位于Heroku-16堆栈上但突然开始失败并出现以下错误:

[master 195f4f9] ...
 1 file changed, 6 insertions(+), 1 deletion(-)
Counting objects: 15, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (15/15), done.
Writing objects: 100% (15/15), 1.66 KiB | 1.66 MiB/s, done.
Total 15 (delta 11), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Ruby app detected
remote: /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/ruby/heroku-16/bin/ruby: error while loading shared libraries: /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/ruby/heroku-16/bin/../lib/libruby.so.2.2: file too short
remote:  !     Push rejected, failed to compile Ruby app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to myherokuapp.
remote: 
To https://git.heroku.com/myherokuapp.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/myherokuapp.git'

我尝试进行捆绑更新,但没有解决任何问题。我也尝试撤消最近对代码的更改,但没有解决问题。最后,我还检查了Heroku状态,并且没有他们报告的相关事件。知道为什么会这样吗?

1 个答案:

答案 0 :(得分:2)

我找到了解决方案。我将我的gemfile中的ruby版本升级到2.3.7,这是Heroku说它支持的一个声明版本,似乎解决了这个问题。