我曾尝试将 gemfile 更改为早期版本,然后再次推送,但似乎不起作用。这是代码。有任何想法吗?
不确定我是否以正确的格式发布,这是我的第一篇 SO 帖子。
任何帮助将不胜感激,我的命令 git push heroku master
生成那个输出。
Counting objects: 133, done.
Compressing objects: 100% (109/109), done.
Writing objects: 100% (133/133), 152.51 KiB | 3.81 MiB/s, done.
Total 133 (delta 14), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Ruby app detected
remote: -----> Installing bundler 2.1.4
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-20/ruby-2.6.3.tgz -s -o - | tar zxf - ' failed on attempt 1 of 3.
remote: Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-20/ruby-2.6.3.tgz -s -o - | tar zxf - ' failed on attempt 2 of 3.
remote:
remote: !
remote: ! The Ruby version you are trying to install does not exist on this stack.
remote: !
remote: ! You are trying to install ruby-2.6.3 on heroku-20.
remote: !
remote: ! Ruby ruby-2.6.3 is present on the following stacks:
remote: !
remote: ! - cedar-14
remote: ! - heroku-16
remote: ! - heroku-18
remote: !
remote: ! Heroku recommends you use the latest supported Ruby version listed here:
remote: ! https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
remote: !
remote: ! For more information on syntax for declaring a Ruby version see:
remote: ! https://devcenter.heroku.com/articles/ruby-versions
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: !
remote: ! ## Warning - The same version of this code has already been built: 5cf5d180a3b3f6f75291fac84f9be0b99d863efc
remote: !
remote: ! We have detected that you have triggered a build from source code with version 5cf5d180a3b3f6f75291fac84f9be0b99d863efc
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a enter code heredifferent branch.
remote: !
remote: ! If you are developing on a branch and deploying via git you must run:
remote: !
remote: ! git push heroku <branchname>:main
remote: !
remote: ! This article goes into details on the behavior:
remote: ! https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to afternoon-garden-77939.
remote:
To https://git.heroku.com/afternoon-garden-77939.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/afternoon-garden-77939.git'
最佳答案
heroku stack
heroku stack:set heroku-18
详细 View https://devcenter.heroku.com/articles/stack
关于ruby-on-rails - 您正在尝试在 heroku-20 上安装 ruby-2.6.3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66279424/