将先前正常工作的Ruby / Rails应用程序推送到Heroku时出现“加载共享库时出错:libruby.so.2.5”

时间:2018-12-20 21:29:03

标签: ruby-on-rails heroku

我在Heroku上托管了一个Ruby on Rails应用程序,该应用程序以前一直在运行。我对该项目进行了少量修改(仅控制器和查看代码,未更改配置设置),当我尝试推送到Heroku时,它失败并显示error while loading shared libraries: libruby.so.2.5: cannot open shared object file: No such file or directory。 git push的整个输出:

Quesadilla:portfolio paulbogard$ git push heroku
Counting objects: 11, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 1.24 KiB | 0 bytes/s, done.
Total 11 (delta 9), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Deleting 1 files matching .slugignore patterns.
remote: -----> Ruby app detected
remote: /app/tmp/buildpacks/b7af5642714be4eddaa5f35e2b4c36176b839b4abcd9bfe57ee71c358d71152b4fd2cf925c5b6e6816adee359c4f0f966b663a7f8649b0729509d510091abc07/vendor/ruby/heroku-16/bin/ruby: error while loading shared libraries: libruby.so.2.5: cannot open shared object file: No such file or directory
remote:  !     Push rejected, failed to compile Ruby app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to pb-portfolio.
remote:
To https://git.heroku.com/pb-portfolio.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/pb-portfolio.git'

我尝试按照this answer中所述清除heroku dyno中的缓存,但是我仍然遇到相同的错误。

该应用程序可以在我的开发设备上正常运行,只是无法将其推送到Heroku。

我如何让Heroku找到它声称丢失的图书馆?

1 个答案:

答案 0 :(得分:0)

问题似乎与我推送到Heroku时连接到公共WiFi热点有关;当我将笔记本电脑连接到手机以访问互联网时,推送成功。

出于某种原因,我认为该源将在Heroku的一端进行编译,但显然是在本地进行编译的,并且公共热点必须一直在阻止访问该库的位置。