【问题标题】:Rails 6 deploy to Heroku, using bundler 2, but still crachesRails 6 使用 bundler 2 部署到 Heroku,但仍然崩溃
【发布时间】:2019-10-19 08:44:26
【问题描述】:

我从 Rails 5.2 更新到 Rails 6.0。 heroku 上的升级问题是已知的:

heroku docs

部署时:

remote: -----> Using Ruby version: ruby-2.6.1
remote: -----> Installing dependencies using bundler 2.0.1

Gemfile.lock:(当然我也在本地更新了bundler)

bundler (2.0.1)

procfile

web: bundle exec bin/rails server -p $PORT -e $RAILS_ENV

删除了 Gemfile.lock 并重新运行 bundle update 并重新部署到 heroku,但仍然出现此错误,它说我正在使用 ruby​​ 2.6.0:问题可能就在这里,但不知道如何解决更正它:

2019-06-03T19:04:00.924967+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.1/lib/bundler/lockfile_parser.rb:108:in `warn_for_outdated_bundler_version': You must use Bundler 2 or greater with this lockfile. (Bundler::LockfileError)

在部署消息中还有:

2019-06-03T19:04:00.925009+00:00 app[web.1]: from /app/config/boot.rb:3:in `<top (required)>'

Heroku 表示:https://devcenter.heroku.com/changelog-items/1563

在我的Gemfile.lock 我有:

RUBY VERSION
   ruby 2.6.1p33

BUNDLED WITH
   2.0.1

不过,该应用在 heroku 上崩溃了。

【问题讨论】:

  • 我猜你知道 Rails 6 还没有发布(因此 Rails 6.0 实际上并不存在)?

标签: ruby-on-rails ruby heroku bundler ruby-on-rails-6


【解决方案1】:

在这方面得到了 Heroku 的大力支持。我需要将procfile(全部小写)的名称更改为Procfile,大写C。

除了我在问题中提供的链接之外,也可以在这里查看:

https://devcenter.heroku.com/articles/bundler-version#known-upgrade-issues

希望这会有所帮助,

【讨论】:

    猜你喜欢
    • 2012-10-02
    • 1970-01-01
    • 1970-01-01
    • 2022-10-07
    • 1970-01-01
    • 2014-02-28
    • 1970-01-01
    • 2021-12-21
    • 2017-10-21
    相关资源
    最近更新 更多