Bug 1810967 - Native Rubygem extensions are not being built automatically by dnf on install
Summary: Native Rubygem extensions are not being built automatically by dnf on install
Alias: None
Product: Fedora
Classification: Fedora
Component: vagrant
Version: 31
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Vít Ondruch
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2020-03-06 10:22 UTC by Newbyte
Modified: 2020-03-06 17:23 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-03-06 17:23:55 UTC
Type: Bug

Attachments (Terms of Use)

Description Newbyte 2020-03-06 10:22:56 UTC
Description of problem:
After installing Vagrant via dnf, the native extensions do not get built by dnf, resulting in a dysfunctional Vagrant installation. 

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

How reproducible:
Install Vagrant and attempt to use it. There will be error messages that extensions are not built and a command is suggested, however it does not work as it targets the wrong Rubygems; it attempts to reinstall the ones in your home directory, rather than the ones in Vagrant's directory (from what I understand). 

The errors look like this: Ignoring ffi-1.10.0 because its extensions are not built. Try: gem pristine ffi --version 1.10.0

Steps to Reproduce:
1. Install vagrant via dnf
2. Run any given vagrant command and observe error messages

Actual results:
Vagrant does not work as it should. 

Expected results:
Vagrant works as it should. 

Additional info:
vagrant-libvirt and possibly other similar packages are affected too.

Comment 1 Newbyte 2020-03-06 10:24:08 UTC
To be clear, I installed vagrant like this: sudo dnf install vagrant

Comment 2 Pavel Valena 2020-03-06 11:38:01 UTC

thanks for the report.

We do not build gem extensions during installation, but rather during the build of RPM packages, so all should be shipped already.

You can check the installed versions, like so: `rpm -q rubygem-ffi`.

Isn't it possible that you have some gems installed locally, from upstream sources, maybe from some previous usage?
They could have been pulled transitively, with f.e. `gem install` or `vagrant plugin install`.

Can remove those installed in folders located `~/.gems/` and `~/.vagrant.d/gems/`, and retry?

Note: `~/.vagrant.d/` has stored the base boxes and other configs from previous usage, so you may want to remove it too. In case of 'clean' installation all of these should be empty.

Comment 3 Newbyte 2020-03-06 17:23:55 UTC

~/.gems/ does not exist on my system, and ~/.vagrant.d/gems/ is empty. That said, there is ~/.gem. I removed both ~/.gem and ~/.vagrant-d and the issue persists.

With that said, you were sort of right. Thanks for the pointers. Long story short, I had previously set up an environment to run Rails in to inspect a friend's codebase and from that pulled in rvm directly from its website. Removing rvm via the command `rvm implode` and restarting my shell resolved the issue.

I apologise for the invalid bug report, and I thank you for the suggestions.

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