【问题标题】:How to set bundler version in heroku?如何在heroku中设置捆绑器版本?
【发布时间】:2013-03-12 09:35:50
【问题描述】:

我需要在我的 gemfile 中指定 ruby​​ 版本,但我在 heroku 中的应用程序使用的是旧的捆绑器版本 1.0.7。

如果我在我的 gemfile 中包含 gem 'bundler', '1.3.2',当我推送到 heroku 时它会失败。

Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    bundler (= 1.3.2)

  Current Bundler version:
    bundler (1.0.7)

Your version of Bundler is older than the one requested by the Gemfile.
Perhaps you need to update Bundler by running `gem install bundler`.

我也尝试运行 heroku run "gem install bundler" 并返回权限错误。

ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the /usr/ruby1.9.2/lib/ruby/gems/1.9.1
 directory.

如何在 heroku 中将 Bundler 版本设置为 1.3.2,以便我可以使用特定的 ruby​​ 版本?

【问题讨论】:

  • 你在 Cedar 堆栈上吗?

标签: heroku bundler


【解决方案1】:

Heroku 将捆绑器作为堆栈的一部分进行管理。我猜你在 Bamboo 堆栈上,因为它使用 1.0.7 而 Cedar 使用的是 1.3.x 版本。

如果您使用 Bamboo,那么恐怕您别无选择,除了升级到 Cedar 之外,您将获得所有最新的好处。

【讨论】:

  • 感谢约翰·贝农。是的,我在 Bamboo stack 上。如何迁移到 Cedar 堆栈?
  • Heroku 上面有整篇文章devcenter.heroku.com/articles/cedar-migration
  • 谢谢。我已经迁移到 Cedar 堆栈,现在我的捆绑器 1.3.2。
猜你喜欢
  • 2018-09-26
  • 2021-11-14
  • 2012-03-07
  • 2017-04-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-06-05
相关资源
最近更新 更多