ruby-on-rails - Ruby Heroku Buildpack 因 Dokku 失败
问题描述
我有一个 Rails 应用程序,我定期在 Heroku 上部署并且总是成功,我正在尝试使用 Dokku 将它迁移到 Digital Ocean。在 Heroku 上,我只安装了 nodejs 和 Ruby buildpacks(按此顺序),我所做的就是推送它。所以,我想我会用 Dokku 图像创建一个数字海洋,添加相同的构建包,并能够推送我的应用程序,但在部署过程中它失败了。这是我在 Digital Ocean 上创建 Droplet 后所做的:
ssh-add -k ~/.ssh/id_rsa
ssh root@123.123.123.123 (IP address of the Droplet)
# Now I have SSH'd into the droplet
dokku apps:create mytestapp
dokku buildpacks:add mytestapp https://github.com/heroku/heroku-buildpack-nodejs.git
dokku buildpacks:add mytestapp https://github.com/heroku/heroku-buildpack-ruby.git
exit
# Now I've exited back into my local machine
git remote add dokku dokku@123.123.123.123:mytestapp
git push dokku master
这是我推送后得到的输出:
Enumerating objects: 15825, done.
Counting objects: 100% (15825/15825), done.
Delta compression using up to 12 threads
Compressing objects: 100% (8331/8331), done.
Writing objects: 100% (15825/15825), 2.14 MiB | 7.52 MiB/s, done.
Total 15825 (delta 11885), reused 9604 (delta 7204)
remote: Resolving deltas: 100% (11885/11885), done.
-----> Cleaning up...
-----> Building mytestapp from herokuish...
-----> Adding BUILD_ENV to build environment...
-----> Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
Detected buildpacks: multi ruby nodejs
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git
=====> Detected Framework: Node.js
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
USE_YARN_CACHE=true
NODE_ENV=production
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
... (bunch of nodejs output and then succeeds)
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-ruby.git
=====> Detected Framework: Ruby
Failed to download a Ruby executable for bootstrapping!
This is most likely a temporary internal error. If the problem
persists, make sure that you are not running a custom or forked
version of the Heroku Ruby buildpack which may need updating.
url: https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/production/ruby-2.6.6.tgz
remote: /tmp/buildpackuip6D/bin/compile: line 31: /tmp/tmp.zjpwB97bqO/bin/ruby: No such file or directory
To 123.123.123.123:mytestapp
! [remote rejected] master -> master (pre-receive hook declined)
它似乎无法下载 Ruby buildpack,但下载 Node buildpack 的第一步完成得很好。这些与 Heroku 使用的构建包相同,我也可以curl
在本地机器上使用 Ruby 构建包curl https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/production/ruby-2.6.6.tgz -o file
。使用 Dokku 从 Heroku 切换到 Digital Ocean 似乎应该很容易。有人可以帮我弄清楚我做错了什么吗?
解决方案
推荐阅读
- android - 如何使用纯 Dart(无 Flutter)仅在 iOS 和 Android 之间共享应用程序逻辑?
- java - 是否可以将 Hibernate Search 6 与 WildFly 24 一起使用?
- visual-studio-code - VS Code:调试控制台中的自动完成功能仅适用于 Tab,不适用于 Enter
- svg - 当符号已设置大小和相对位置时缩放 SVG
- javascript - 是否可以使用 Javascript 中的另一个函数停止循环?
- c# - C# ref 返回一个 ref 返回
- python - 日期时间字段在注释查询中干扰 Django order_by
- typescript - 解决 VSCode 错误和 Typescript 4.4+ 差异
- webdriver - WebDriver - Chrome - excludeSwitches 列表
- reactjs - 当我导航到其他屏幕并快速重新导航到同一屏幕时,屏幕安装两次