捆绑安装不适用于捆绑程序 2.0.1 的 rails-4.2.6



RVM设置在ruby-2.4.0上,我创建了具有版本的新应用程序,

gem 'rails', '4.2.6'

我使用更新了捆绑器,

gem update --system
gem install bundler
bundle version
# Bundler version 2.0.1 (2019-01-04 commit d7ad2192f)

但是我在bundle install时遇到以下错误,

Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    rails (= 4.2.6) was resolved to 4.2.6, which depends on
      bundler (< 2.0, >= 1.3.0)
  Current Bundler version:
    bundler (2.0.1)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (< 2.0, >= 1.3.0)', which is required by gem 'rails (= 4.2.6)', in any of the sources.

它要求我需要较低版本的捆绑器,为什么?我应该如何解决上述问题?

安装任何版本为 (<2.0,>= 1.3.0( 的捆绑程序。

例如

gem install bundler -v 1.17.3

然后

bundle _1.17.3_ install

它应该适用于您的情况。

您的Gemfile指定了与 2.x.x 不兼容的旧捆绑器版本。 尝试运行gem install bundler -v 1.3.0或您在Gemfile.lock中列出的任何版本(检查文件末尾(。

相关内容

  • 没有找到相关文章

最新更新