[英]Why does GitLab deployment to Heroku fail, after Ruby version upgrade to 3.1.2?
I'm trying to deploy an existing Rails app to Heroku, having the Ruby version upgraded from 2.7.1 to 3.1.2.我正在尝试将现有的 Rails 应用程序部署到 Heroku,将 Ruby 版本从 2.7.1 升级到 3.1.2。 Also updated bundler to 2.3.25 which seems to be supported by Heroku .
还将 bundler 更新为 2.3.25,这似乎受Heroku支持。
Everyting runs smoothly (build, tests, etc), except for the POST deploy steps, (the app gets deployed to Heroku, but it returns an error which causes the pipeline to fail).除 POST 部署步骤外,一切都运行顺利(构建、测试等)(应用程序已部署到 Heroku,但它返回导致管道失败的错误)。
GitLab CI Logs: GitLab CI 日志:
Released v819
https://my-app-example.herokuapp.com/ deployed to Heroku
Running "bundle exec rails db:migrate"
Already up to date!
HEAD detached at 89d25d5
Untracked files:
(use "git add <file>..." to include in what will be committed)
vendor/ruby/
nothing added to commit but untracked files present (use "git add" to track)
Dropped refs/stash@{0} (01235a1234039bbade856ddb025e053ca1234c2d)
/usr/local/bundle/gems/rendezvous-0.1.3/lib/rendezvous.rb:44:in `start': uninitialized constant Rendezvous::StringIO (NameError)
if input.is_a?(StringIO)
^^^^^^^^
from /usr/local/bundle/gems/rendezvous-0.1.3/lib/rendezvous.rb:28:in `start'
from /usr/local/bundle/gems/dpl-heroku-1.10.16/lib/dpl/provider/heroku/generic.rb:86:in `run'
from /usr/local/bundle/gems/dpl-1.10.16/lib/dpl/provider.rb:205:in `block (2 levels) in deploy'
from /usr/local/bundle/gems/dpl-1.10.16/lib/dpl/cli.rb:41:in `fold'
from /usr/local/bundle/gems/dpl-1.10.16/lib/dpl/provider.rb:205:in `block in deploy'
from /usr/local/bundle/gems/dpl-1.10.16/lib/dpl/provider.rb:201:in `each'
from /usr/local/bundle/gems/dpl-1.10.16/lib/dpl/provider.rb:201:in `deploy'
from /usr/local/bundle/gems/dpl-1.10.16/lib/dpl/cli.rb:32:in `run'
from /usr/local/bundle/gems/dpl-1.10.16/lib/dpl/cli.rb:7:in `run'
from /usr/local/bundle/gems/dpl-1.10.16/bin/dpl:5:in `<top (required)>'
from /usr/local/bundle/bin/dpl:25:in `load'
from /usr/local/bundle/bin/dpl:25:in `<main>'
Cleaning up project directory and file based variables
00:02
ERROR: Job failed: exit code 1
I thought there are some old dependencies being cached, but it didn't help clearing the pipeline cache.我以为缓存了一些旧的依赖项,但它无助于清除管道缓存。
Edit:编辑:
Found the same issue raised here, but still no solutions: https://github.com/travis-ci/dpl/issues/1264发现这里提出了同样的问题,但仍然没有解决方案: https://github.com/travis-ci/dpl/issues/1264
Got this working by installing faraday
gem.通过安装
faraday
gem 让这个工作正常。
In Gitlab CI:在 Gitlab CI:
- gem install dpl
- gem install faraday -v 1.8.0
...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.