Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Bundler 1.17.2 fails on Ruby 1.9.2 #6839

Closed
schneems opened this issue Dec 17, 2018 · 0 comments
Closed

Bundler 1.17.2 fails on Ruby 1.9.2 #6839

schneems opened this issue Dec 17, 2018 · 0 comments

Comments

@schneems
Copy link
Contributor

Hello. I'm seeing this failure when running bundle install with Bundler 1.17.2 on Ruby 1.9.2:

NameError: undefined local variable or method `options' for #<Bundler::RubyGemsGemInstaller:0x000000082b8128>

Here's how to reproduce with docker:

$ docker pull allenwei/ruby-1.9.2
$ docker run -i -t allenwei/ruby-1.9.2:latest /bin/bash

Inside of the container:

$ ruby -v
ruby 1.9.2p330 (2014-08-07 revision 47094) [x86_64-linux]
$ git clone https://github.com/sharpstone/mri_192
$ cd mri_192/
$ gem install bundler -v 1.17.2
$ bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment

Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.
Fetching gem metadata from https://rubygems.org/..............
RubyGems 1.3.7.1 is not threadsafe, so your gems will be installed one at a time. Upgrade to RubyGems 2.1.0 or higher to enable parallel gem installation.
Using bundler 1.17.2
Fetching rack 1.5.0
Installing rack 1.5.0
NameError: undefined local variable or method `options' for #<Bundler::RubyGemsGemInstaller:0x000000082b8128>
An error occurred while installing rack (1.5.0), and Bundler cannot continue.
Make sure that `gem install rack -v '1.5.0' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  rack

ghost pushed a commit that referenced this issue Dec 18, 2018
6840: fix installing gems on _really_ old versions of RubyGems r=segiddins a=colby-swandale

### What was the end-user problem that led to this PR?

Installing gems on _really really_ old versions of RubyGems is not working. See #6839

### What was your diagnosis of the problem?

We were accessing an instance variable which did not exist

### What is your fix for the problem, implemented in this PR?

instantiate the instance variable ourselves.

### Why did you choose this fix out of the possible options?

This was the simplest solution that can be easily merged with `1-17-stable`

Fixes #6839


Co-authored-by: Colby Swandale <me@colby.fyi>
ghost pushed a commit that referenced this issue Dec 19, 2018
6840: fix installing gems on _really_ old versions of RubyGems r=colby-swandale a=colby-swandale

### What was the end-user problem that led to this PR?

Installing gems on _really really_ old versions of RubyGems is not working. See #6839

### What was your diagnosis of the problem?

We were accessing an instance variable which did not exist

### What is your fix for the problem, implemented in this PR?

instantiate the instance variable ourselves.

### Why did you choose this fix out of the possible options?

This was the simplest solution that can be easily merged with `1-17-stable`

Fixes #6839


Co-authored-by: Colby Swandale <me@colby.fyi>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant