如何让bundler使用旧版的Bundler gem版本? [重复]

时间:2022-07-05 00:20:07

This question already has an answer here:

这个问题在这里已有答案:

I have downloaded the older version of bundler I need but I'm not sure how to make my bundler command line commands use this older version of the gem? How would I do this?

我已经下载了我需要的旧版本的bundler但是我不确定如何让我的bundler命令行命令使用这个旧版本的gem?我该怎么办?

Background

背景

  • Need to use ruby 1.8.7 on dreamhost, so have targeted Rails v3.2 for this.
  • 需要在dreamhost上使用ruby 1.8.7,所以为此针对Rails v3.2。
  • It seems I need to use an older version of bundler with ruby 1.8.7 so I've targeted bundler version 1.0.22 for this. I note this as if I use bundler v1.9.2 I'm getting after "bundle install" the error "Gem::InstallError: i18n requires Ruby version >= 1.9.3."
  • 看来我需要使用旧版本的bundler与ruby 1.8.7,所以我为此针对Bundler版本1.0.22。我注意到这就像我使用bundler v1.9.2我在“bundle install”之后得到错误“Gem :: InstallError:i18n需要Ruby版本> = 1.9.3。”

Command line

命令行

Gregs-MacBook-Pro:weekends Greg$ gem list bundler
*** LOCAL GEMS ***
bundler (1.9.2, 1.0.22, 1.0.0)

Gregs-MacBook-Pro:weekends Greg$ bundler -v
Bundler version 1.9.2

1 个解决方案

#1


3  

You can use bundle _version_ install to install gems using a specific version.

您可以使用bundle _version_ install来使用特定版本安装gem。

Here's an example:

这是一个例子:

bundle _1.0.21_ install

or

要么

bundle _1.0.21_ -v
# Bundler version 1.0.2

Reference: http://makandracards.com/makandra/9741-run-specific-version-of-bundler

参考:http://makandracards.com/makandra/9741-run-specific-version-of-bundler

#1


3  

You can use bundle _version_ install to install gems using a specific version.

您可以使用bundle _version_ install来使用特定版本安装gem。

Here's an example:

这是一个例子:

bundle _1.0.21_ install

or

要么

bundle _1.0.21_ -v
# Bundler version 1.0.2

Reference: http://makandracards.com/makandra/9741-run-specific-version-of-bundler

参考:http://makandracards.com/makandra/9741-run-specific-version-of-bundler