Skip to content

Add missing requires#2196

Merged
bundlerbot merged 1 commit intoruby:masterfrom
deivid-rodriguez:add_missing_requires
Feb 18, 2018
Merged

Add missing requires#2196
bundlerbot merged 1 commit intoruby:masterfrom
deivid-rodriguez:add_missing_requires

Conversation

@deivid-rodriguez
Copy link
Copy Markdown
Contributor

@deivid-rodriguez deivid-rodriguez commented Feb 17, 2018

Description:

I'm getting some crashes when running tests for my gem: https://circleci.com/gh/decidim/decidim/54469.
Adding the missing requires that the error points to seems to fix them. The require in dependency.rb comes from the error message, the second require comes from the error message that still appears after adding the first require.

I tried to isolate this, but I couldn't. So the minimal reproduction would be:

git clone https://github.com/decidim/decidim
cd decidim
git checkout rails-5.1.5-and-pg-1.0
bundle install
bundle exec rspec spec/generator_spec.rb[1:1:1:1]

Tasks:

  • Describe the problem / feature
  • Write tests
  • Write code to solve the problem
  • Get code review from coworkers / friends

I will abide by the code of conduct.

@segiddins
Copy link
Copy Markdown
Contributor

Thanks! @bundlerbot r+

@bundlerbot
Copy link
Copy Markdown
Contributor

📌 Commit e093fb7 has been approved by segiddins

@bundlerbot
Copy link
Copy Markdown
Contributor

⌛ Testing commit e093fb7 with merge bca15aa...

bundlerbot added a commit that referenced this pull request Feb 18, 2018
Add missing requires

# Description:

I'm getting some crashes when running tests for my gem: https://circleci.com/gh/decidim/decidim/54469.
Adding the missing requires that the error points to seems to fix them. The require in `dependency.rb` comes from the error message, the second require comes from the error message that still appears after adding the first require.

I tried to isolate this, but I couldn't. So the minimal reproduction would be:

```
git clone https://github.com/decidim/decidim
cd decidim
git checkout rails-5.1.5-and-pg-1.0
bundle install
bundle exec rspec spec/generator_spec.rb[1:1:1:1]
```

# Tasks:

- [x] Describe the problem / feature
- [ ] Write tests
- [x] Write code to solve the problem
- [ ] Get code review from coworkers / friends

I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md).
@bundlerbot
Copy link
Copy Markdown
Contributor

☀️ Test successful - status-travis
Approved by: segiddins
Pushing bca15aa to master...

@bundlerbot bundlerbot merged commit e093fb7 into ruby:master Feb 18, 2018
@deivid-rodriguez deivid-rodriguez deleted the add_missing_requires branch February 18, 2018 20:41
@deivid-rodriguez
Copy link
Copy Markdown
Contributor Author

Thanks to you! :)

@hsbt hsbt added this to the 2.7.7 milestone Feb 27, 2018
hsbt pushed a commit that referenced this pull request Apr 28, 2018
Add missing requires

I'm getting some crashes when running tests for my gem: https://circleci.com/gh/decidim/decidim/54469.
Adding the missing requires that the error points to seems to fix them. The require in `dependency.rb` comes from the error message, the second require comes from the error message that still appears after adding the first require.

I tried to isolate this, but I couldn't. So the minimal reproduction would be:

```
git clone https://github.com/decidim/decidim
cd decidim
git checkout rails-5.1.5-and-pg-1.0
bundle install
bundle exec rspec spec/generator_spec.rb[1:1:1:1]
```

- [x] Describe the problem / feature
- [ ] Write tests
- [x] Write code to solve the problem
- [ ] Get code review from coworkers / friends

I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md).
lamont-granquist added a commit to chef/appbundler that referenced this pull request May 2, 2018
in at least rubygems 2.7.6 when two chef gems are installed (as an
example, but i think the problem is generalized to other gems with
two installed versions, but it repros nicely with two chef gems),
instead of pinning a version a bundler bug makes us explode with

/opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/dependency.rb:284:in `matching_specs': uninitialized constant Gem::BundlerVersionFinder (NameError)

which is ruby/rubygems#2196

this works around the bug by doing the require here, protected with
exception handling to not blow up on rubygems versions that don't
have this class.

once 2.7.7 / 2.8.0 is released this code should probably be
deleted (at the same time the exception means it shouldn't hurt
anything).

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants