ruby-on-rails - Heroku 和 bundler 版本

标签 ruby-on-rails ruby heroku rubygems

我像往常一样在 Heroku 上推送代码。

但是这条消息出现了:

Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running gem install bundler.

所以我跑:

heroku run gem install bundler

Running gem install bundler on ⬢ myapp... up, run.3401 (Standard-1X)

Fetching: bundler-1.16.1.gem (100%)

Successfully installed bundler-1.16.1

Parsing documentation for bundler-1.16.1

Installing ri documentation for bundler-1.16.1

Done installing documentation for bundler after 11 seconds

1 gem installed

但是当我重试推送代码时:

heroku run bundle install

Running bundle install on ⬢ myapp... up, run.9532 (Standard-1X)

Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running gem install bundler.

在我得到的 gem Gemfile.lock 中:

BUNDLED WITH 1.16.1

我不明白为什么这个 bundler 版本不想安装在 Heroku 上。

最佳答案

Bundler 1.15.2 是预装在 Heroku dynos 上的版本。在您的计算机上将 Bundler 更改为 1.16.1 不会更改 Heroku 上安装的版本。

此外,您无法通过运行 bundle install 在 Heroku 上更新 Bundler。即使这是可能的,它也会在 Bundler 的下一次运行中生效——通常,您只在 Heroku dyno 上捆绑一次。

我的建议是:这只是一个警告,忽略它,希望 Heroku 以后能更频繁地更新 Bundler。

关于ruby-on-rails - Heroku 和 bundler 版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49857155/

相关文章:

ruby-on-rails - ruby on rails if 语句在 index.html.erb 页面上带有 bool 值

ruby-on-rails - Rails ActionController::InvalidAuthenticityToken 所有浏览器

node.js - 如何扩展使用其他服务的 Node.js 服务?

ruby-on-rails - 如何更改部署 heroku 应用程序的提取和推送操作目标

ruby-on-rails - 为演示者定制工厂女孩 linting

html - 定义列表与缺失定义的对齐

ruby-on-rails - 自动化网站交互 - Mechanzie - Rails

css - 使用 rails 和 bootstrap 时不显示占位符文本

ruby - 如何在 Mongoid 中获取模型的所有列名

python - 推送到 Heroku : requested runtime is not available for this stack 时出错