Project

General

Profile

Actions

Bug #15586

closed

Requiring `bundler/setup` gets wrong version

Added by MarkTheStrange (Mark Reed) about 5 years ago. Updated about 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-darwin18]
[ruby-core:91398]

Description

The statement 'require "bundler/setup"' always loads the version that ships with ruby (Bundler 1.17.2 as of Ruby 2.6.1), even if a newer version of Bundler is installed via RubyGems. On the other hand, requiring plain "bundler" gets the gem-installed version.

Demo:

$ ruby -rbundler -e 'puts Bundler::VERSION'
2.0.1
$ ruby -rbundler/setup -e 'puts Bundler::VERSION'
1.17.2

This breaks pretty much all my bundled applications, which start by requiring bundler/setup, which fails when the Gemfile.lock was created by Bundler 2.x and the loaded Bundler is 1.x.


Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #15582: default/bundler-1.17.2.gemspec has no file listClosedhsbt (Hiroshi SHIBATA)Actions
Actions #1

Updated by mame (Yusuke Endoh) about 5 years ago

  • Is duplicate of Bug #15582: default/bundler-1.17.2.gemspec has no file list added

Updated by mame (Yusuke Endoh) about 5 years ago

  • Status changed from Open to Closed

Sorry for the inconvenience. This is a duplicate of #15582, and it has been already fixed at trunk. You can also workaround the issue with this patch: https://bugs.ruby-lang.org/issues/15582#note-2

Actions

Also available in: Atom PDF

Like0
Like0Like0