【发布时间】:2019-10-19 08:44:26
【问题描述】:
我从 Rails 5.2 更新到 Rails 6.0。 heroku 上的升级问题是已知的:
部署时:
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