ruby-on-rails - 捆绑安装不适用于 bundler 2.0.1 的 rails-4.2

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

gem 'rails', '4.2.6'

我更新了 bundler ,使用

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.

它要求我提供较低版本的 bundler ,为什么?上面应该怎么解决?

最佳答案

安装任何版本为 (= 1.3.0) 的 bundler 。

例如

gem install bundler -v 1.17.3

然后

bundle _1.17.3_ install

它应该适合您的情况。

关于ruby-on-rails - 捆绑安装不适用于 bundler 2.0.1 的 rails-4.2.6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55498245/

相关文章:

hibernate - 当我从 POST 方法更新它时,@CreationTimestamp 列设置

python - 如何更改 Rstudio 中的默认 python 版本/路径

csv - 将 CSV 文件导入为矩阵

list - Haskell:列表操作

java - 如何用 java 将换行符替换为 "\n"?

python - Django createsuperuser 抛出 django.core.exc

reactjs - 如何在 ant design 的模态页脚上添加另一个按钮?

python - MacOS 构建问题 lstdc++ not found while buildi

php - Yii2:如何禁用或只读 Select2 小部件?

java - 修复 Java newInstance() 已弃用