Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing fileutils require #3911

Merged
merged 1 commit into from
Aug 31, 2020
Merged

Add missing fileutils require #3911

merged 1 commit into from
Aug 31, 2020

Conversation

deivid-rodriguez
Copy link
Member

Description:

On my system, the error was being hidden by the presence of a YARD rubygems plugin that was providing the require and making things work.

However, on a pristine system, gem outdated would fail with

 ERROR:  While executing gem ... (NameError)
    uninitialized constant Gem::Source::FileUtils
Did you mean?  FileTest

Fixes #3894.

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.

@bundlerbot bundlerbot added CI CI related issues RubyGems labels Aug 28, 2020
On my system, the error was being hidden by the presence of a YARD
rubygems plugin that was providing the require and making things work.
@bronzdoc bronzdoc merged commit 07e2d26 into master Aug 31, 2020
@bronzdoc bronzdoc deleted the missing_fileutils_require branch August 31, 2020 06:23
@hsbt hsbt added this to the RubyGems 3.2.0/Bundler 2.2.0 milestone Oct 6, 2020
hsbt pushed a commit that referenced this pull request Oct 6, 2020
@FrankFang
Copy link

FrankFang commented Dec 22, 2020

Hey guys, I notice another "FileUtils.mkdir_p" at line 151 of source.rb

Why not add require "fileutils" before it ?

Installing ruby-debug-ide 0.7.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /home/aaa/bbb/vendor/bundle/ruby/3.0.0/gems/ruby-debug-ide-0.7.2/ext
/usr/local/bin/ruby mkrf_conf.rb
Installing base gem
uninitialized constant Gem::Source::FileUtils
Did you mean?  FileTest
/usr/local/lib/ruby/3.0.0/rubygems/source.rb:151:in `fetch_spec'
  /usr/local/lib/ruby/3.0.0/rubygems/resolver/api_specification.rb:91:in `spec'
  /usr/local/lib/ruby/3.0.0/rubygems/resolver/installer_set.rb:77:in `add_always_install'
  /usr/local/lib/ruby/3.0.0/rubygems/dependency_installer.rb:321:in `resolve_dependencies'
  /usr/local/lib/ruby/3.0.0/rubygems/dependency_installer.rb:228:in `install'
  mkrf_conf.rb:31:in `rescue in <main>'
  mkrf_conf.rb:24:in `<main>'

rake failed, exit code 1

rails version: Rails 6.1.0
ruby version: ruby 3.0.0preview2

@FrankFang
Copy link

I see, it was fixed at the master branch https://github.com/rubygems/rubygems/blob/master/lib/rubygems/source.rb#L157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gem outdated - FileUtils missing
5 participants