Vagrant Ignoring ffi-1.9.14 because its extensions are not built. Try: gem pristine ffi –version 1.9.14

If you’re like me and don’t want to see errors or warnings every time you work with some tool in your system I  have something for you.

Have you ever seen these kind of warnings when working with Vagrant ?

Ignoring ffi-1.9.14 because its extensions are not built.  Try: gem pristine ffi --version 1.9.14
Ignoring ffi-1.9.10 because its extensions are not built.  Try: gem pristine ffi --version 1.9.10
Ignoring nokogiri-1.6.7.1 because its extensions are not built.  Try: gem pristine nokogiri --version 1.6.7.1
Ignoring nokogiri-1.6.3.1 because its extensions are not built.  Try: gem pristine nokogiri --version 1.6.3.1
Ignoring unf_ext-0.0.7.2 because its extensions are not built.  Try: gem pristine unf_ext --version 0.0.7.2
Ignoring unf_ext-0.0.7.1 because its extensions are not built.  Try: gem pristine unf_ext --version 0.0.7.1

Recently I upgraded my laptop and because of that I decided to check all my installed software and also upgrade it to the latest version.

During this process I upgraded Vagrant, this software is really helpful for development, it allows you to create an exact same environment as staging or production but in your local computer. This way you can test software, install new packages and whenever you see everything is ready then you can apply same configuration in your production environments.

After my upgrade I started to see a lot of warnings like these:

$ vagrant up
Ignoring ffi-1.9.14 because its extensions are not built.  Try: gem pristine ffi --version 1.9.14
Ignoring ffi-1.9.10 because its extensions are not built.  Try: gem pristine ffi --version 1.9.10
Ignoring nokogiri-1.6.7.1 because its extensions are not built.  Try: gem pristine nokogiri --version 1.6.7.1
Ignoring nokogiri-1.6.3.1 because its extensions are not built.  Try: gem pristine nokogiri --version 1.6.3.1
Ignoring unf_ext-0.0.7.2 because its extensions are not built.  Try: gem pristine unf_ext --version 0.0.7.2
Ignoring unf_ext-0.0.7.1 because its extensions are not built.  Try: gem pristine unf_ext --version 0.0.7.1

I know are only warnings and they’re not breaking anything however is a bit annoying to see the this every time you start up your vagrant box.

First thing I tried was to use the suggestion you can see in the warning message:

$ gem pristine ffi --version 1.9.14
ERROR:  While executing gem ... (Gem::Exception)
    Failed to find gems ["ffi"] = 1.9.14

However this didn’t work as expected.

I tried also to install it using gem but that didn’t work either.

After some googling over there I found a very nice solution to remove these warnings.

Long story short is, basically you need to completely uninstall vagrant and install it again.

Let’s do it.

$ sudo rm -rf /opt/vagrant
$ sudo rm -f /usr/local/bin/vagrant
$ sudo pkgutil --forget com.vagrant.vagrant

By running these commands you completely uninstall vagrant from your computer. If you need more info about pkguitl visit this link. This tool allows you to manage installed packages in your system.

Once you’re done you can visit vagrant download page to choose the package you need to install in your system. So next step, will be install again new vagrant version.

Now we can see the new vagrant version installed.

$ vagrant --version
Vagrant 2.0.1

And if we now run vagrant up command we won’t see anymore those annoying warnings.

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
...

Hope this article helps you.


Google+

 

 

3 thoughts on “Vagrant Ignoring ffi-1.9.14 because its extensions are not built. Try: gem pristine ffi –version 1.9.14

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s