ruby-on-rails - Rails 5.0.2 与 bundler 2.0.1 不兼容

标签 ruby-on-rails incompatibility gem-bundler

我目前正在运行带 bundler 的 Rails 5.0.2(<2.0,>=1.3.0)。今天早上,当我运行“gem install bundler”时,它最终安装了现在与 Rails 5.0.2 不兼容的 bundler 2.0.1。我想知道我是应该升级我的 Rails 版本还是降级 bundler 版本。请在下面查看我的 jenkins 构建的日志。

gem install bundler
Successfully installed bundler-2.0.1
Parsing documentation for bundler-2.0.1
Done installing documentation for bundler after 5 seconds
1 gem installed
bundle install
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
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 (~> 5.0.2) was resolved to 5.0.2, which depends on
      bundler (< 2.0, >= 1.3.0)

  Current Bundler version:
    bundler (2.0.1)
This Gemfile requires a different version of Bundler.

最佳答案

尝试

gem update --system

之后

bundle install

关于ruby-on-rails - Rails 5.0.2 与 bundler 2.0.1 不兼容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54499604/

相关文章:

java - 返回中的不兼容类型错误给我错误?

php - 变量变量处理顺序: changes in PHP 7

ruby-on-rails - Bundler 与 Rubygems 2.0 不兼容。请升级到 Bundler 1.3 或更高版本

ruby-on-rails-4 - Git Push to Rails Production 给出响应您的 Ruby 版本是 1.9.3,但是当 Ruby 版本是 2.2.2 时,您的 Gemfile 指定了 2.2.2

ruby-on-rails - 无法安装 mysql2 gem,libmysqlclient.so.15 加载错误

javascript - rails 4 : display spinner with javascript on form submit

sql - 在 attr_encrypted 列上的 rails 中查询

bash - 为什么 source 命令不适用于 bash 3.2 中的进程替换?

ruby - 如何更改与 gemfile.lock bundle 在一起的版本

javascript - 如何从另一个模型访问一个模型属性以在 Rails 5 中传递 javascript View 部分?