如何使用特定版本的捆绑软件捆绑安装gemfile

问题描述 投票:0回答:1

我正在尝试捆绑安装运行gem 'rails', '4.2.0'的项目。运行Bundle install,我得到:

Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    rails (= 4.2.0) was resolved to 4.2.0, which depends on
      bundler (>= 1.3.0, < 2.0)

  Current Bundler version:
    bundler (2.1.4)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?

Could not find gem 'bundler (>= 1.3.0, < 2.0)', which is required by gem 'rails (= 4.2.0)', in any of the sources.

因此,我然后尝试安装捆绑程序v 1.3.0以成功捆绑此gemfile:gem install bundler -v 1.3.0

gem list bundler shows me that I successfully installed bundler at v 1.3.0

然后尝试像这样bundle _1.3.0_ install捆绑在v 1.3.0中安装时,我得到了Could not find command "_1.3.0_".

如何使用该特定版本的捆绑程序成功运行捆绑软件安装?

ruby-on-rails ruby dependencies bundler
1个回答
0
投票

您可以通过这种方式安装bundler 1.3版:

gem install bundler -v 1.3

然后使用该特定版本安装gem:

bundle _1.3.0_ [install]

希望有帮助!

© www.soinside.com 2019 - 2024. All rights reserved.