Bug 1817178 - "bundle install" fails to install nio4r gem by "did_you_mean (LoadError)".
Summary: "bundle install" fails to install nio4r gem by "did_you_mean (LoadError)".
Alias: None
Product: Fedora
Classification: Fedora
Component: ruby
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Vít Ondruch
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2020-03-25 18:06 UTC by Jun Aruga
Modified: 2020-04-25 02:24 UTC (History)
10 users (show)

Fixed In Version: ruby-2.7.1-130.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-04-25 02:24:23 UTC
Type: Bug

Attachments (Terms of Use)

Description Jun Aruga 2020-03-25 18:06:23 UTC
Description of problem:

"bundle install --path=vendor/bundle" with the Gemfile fails to install "nio4r"
showing the error message "did_you_mean (LoadError)", using RPM ruby (ruby-2.7.0-127.fc32.x86_64).

rubygem-did_you_mean RPM is installed to the system.

In case of rubygem-did_you_mean RPM, did_you_mean is a normal gem, as you know.

$ gem list did_you_mean

*** LOCAL GEMS ***

did_you_mean (1.4.0)

In case of upstream Ruby 2.7.0's did_you_mean, did_you_mean is a default gem. And this issue does not happen with the upstream Ruby.

$ gem list did_you_mean

*** LOCAL GEMS ***

did_you_mean (default: 1.4.0)

Version-Release number of selected component (if applicable):

* Fedora rawhide
* ruby-2.7.0-127.fc32.x86_64
* ruby-devel-2.7.0-127.fc32.x86_64
* rubygem-bundler-2.1.2-127.fc32.noarch
* rubygem-did_you_mean-1.4.0-127.fc32.noarch

How reproducible:

Steps to Reproduce:
1. Prepare following `Gemfile`.

$ cat Gemfile 
source "https://rubygems.org"

gem "nio4r", "= 2.5.2"

2. Run following command.

$ bundle install --path=vendor/bundle

Actual results:

$ bundle install --path=vendor/bundle
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using bundler 2.1.2
Fetching nio4r 2.5.2
Installing nio4r 2.5.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /builddir/work/vendor/bundle/ruby/2.7.0/gems/nio4r-2.5.2/ext/nio4r
/usr/bin/ruby -I /usr/share/rubygems -r ./siteconf20200325-523-11don1e.rb extconf.rb
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file
-- did_you_mean (LoadError)
	from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:92:in `require'
	from <internal:gem_prelude>:2:in `<internal:gem_prelude>'

extconf failed, exit code 1

Gem files will remain installed in /builddir/work/vendor/bundle/ruby/2.7.0/gems/nio4r-2.5.2
for inspection.
Results logged to

An error occurred while installing nio4r (2.5.2), and Bundler cannot continue.
Make sure that `gem install nio4r -v '2.5.2' --source 'https://rubygems.org/'` succeeds before

In Gemfile:

Expected results:

$ bundle install --path=vendor/bundle

installs nio4r successfully.

Additional info:

rubygems RPM's gem command succeeds to install nio4r like this on Fedora rawhide.

# gem instal nio4r
Building native extensions. This could take a while...
Successfully installed nio4r-2.5.2
Parsing documentation for nio4r-2.5.2
Done installing documentation for nio4r after 0 seconds
1 gem installed

So, I assume this is a Bundler specific issue.

Comment 1 Jun Aruga 2020-04-03 14:45:10 UTC
Possibly here is a temporary workflow to fix this issue when you still see this issue.

$ sudo ln -s /usr/share/gems/gems/did_you_mean-1.4.0/lib/did_you_mean.rb /usr/share/ruby/did_you_mean.rb
$ sudo ln -s /usr/share/gems/gems/did_you_mean-1.4.0/lib/did_you_mean /usr/share/ruby/did_you_mean

Comment 2 Jun Aruga 2020-04-03 14:55:24 UTC
I conformed that the temporary workflow fixes this issue on ruby-2.7.1-128.fc33.x86_64 .

Comment 3 Vít Ondruch 2020-04-08 16:32:23 UTC
@Jun could you please give try to https://src.fedoraproject.org/rpms/ruby/pull-request/57 ? The CI should soon kick in to provide you the RPMs.

Comment 4 Jun Aruga 2020-04-08 17:21:00 UTC
Yes, let me check tomorrow.

Comment 5 Fabio Valentini 2020-04-13 15:40:19 UTC
(In reply to Jun Aruga from comment #1)
> Possibly here is a temporary workflow to fix this issue when you still see
> this issue.
> ```
> $ sudo ln -s /usr/share/gems/gems/did_you_mean-1.4.0/lib/did_you_mean.rb
> /usr/share/ruby/did_you_mean.rb
> $ sudo ln -s /usr/share/gems/gems/did_you_mean-1.4.0/lib/did_you_mean
> /usr/share/ruby/did_you_mean
> ```

I was starting to tear my hair out because I could not get jekyll to work on fedora 32 anymore because of this issue.

Thanks for your workaround! It definitely saved my day.

Comment 6 Fedora Update System 2020-04-16 08:33:04 UTC
FEDORA-2020-9de8f1c534 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-9de8f1c534

Comment 7 Fedora Update System 2020-04-16 19:29:33 UTC
FEDORA-2020-9de8f1c534 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-9de8f1c534`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-9de8f1c534

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2020-04-25 02:24:23 UTC
FEDORA-2020-9de8f1c534 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.