简体   繁体   English

为什么GitLab部署到Heroku失败,Ruby版本升级到3.1.2后?

[英]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.

相关问题 Ruby Heroku 部署失败:此版本的 Ruby 在 Heroku-18 上不可用。 如何升级我的ruby版本并部署成功? - Ruby Heroku deployment failing: This version of Ruby is not available on Heroku-18. How can I upgrade my ruby version and make the deployment succeed? Heroku Ruby版本不会升级吗? - Heroku Ruby version won't upgrade? 项目升级后,Pow不会更改ruby版本 - Pow does not change ruby version after project upgrade BCrypt 3.1.2更新导致Heroku推送失败 - BCrypt 3.1.2 update causing Heroku push to fail ruby 从 3.0.2 升级到 3.1.2 时出错 - Error on ruby upgrade to 3.1.2 from 3.0.2 为什么这个Ruby for循环失败? - Why does this Ruby for loop fail? 为什么Travis部署到Heroku失败? - Why does this Travis deploy to Heroku fail? 没有 rvm 或 rbenv 的 ruby​​ 升级后 Ruby 版本不匹配 - Ruby version mismatch after ruby upgrade without rvm or rbenv 将 ruby​​ 从 2.4.0 升级到 2.7.0 并将 RubyGem 升级到 3.1.2 后,由于“不允许安装到父路径中”,我无法在 Windows 上安装任何 gem - After upgrade ruby from 2.4.0 to 2.7.0 and RubyGem to 3.1.2 I can't install any gem on windows due to "installing into parent path is not allowed" 部署后如何设置或调试Heroku Ruby应用 - How to setup or debug Heroku Ruby app after deployment
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM