command-t icon indicating copy to clipboard operation
command-t copied to clipboard

Ignoring ffi-1.9.18 because its extensions are not built. Try: gem pristine ffi --version 1.9.18

Open lencioni opened this issue 7 years ago • 16 comments

When I trigger Command-T for the first time in a session, I see this message

Ignoring ffi-1.9.18 because its extensions are not built. Try: gem pristine ffi --version 1.9.18

I've found some other folks who have had luck by doing things like

gem update bundler
gem install curb

but for me the problem persists. Any suggestions?

  • http://lfender6445.github.io/vim-command-t-ignoring-gem-name-because-its-extensions-are-not-buil-try-gem-pristine/
  • https://stackoverflow.com/questions/25468766/vim-command-t-ignoring-gem-name-because-its-extensions-are-not-built-try-gem

lencioni avatar Feb 01 '18 19:02 lencioni

Command-T doesn't have any Gem dependencies, and isn't invoking Bundler in any way, so I am not sure where that is coming from. Does a similar thing happen if you just do :ruby puts 'hi'? Or maybe do anything that would force Ruby to evaluate the loadpath, like :ruby require 'ostruct'?

wincent avatar Feb 03 '18 00:02 wincent

No, neither of those things cause this to happen.

lencioni avatar Feb 05 '18 16:02 lencioni

It seems unlikely that I'll be able to repro this. A google for "Ignoring ffi" "because its extensions are not built" turns up a bunch of hits with all sorts of combinations of Ruby environments (eg. chruby, rvm etc) and tools (almost none of which mention Command-T). This one seems pretty typical:

I came across this exact issue today - getting warnings like this for gems that weren't even installed!

... Well, it turns out the gems were installed - for a different ruby than the one I had set active with chruby (2.2.3 vs 2.3.1).

Switching to all the different rubies and running gem pristine --all on all of them solved the problem.

I don't think this is specific to Command-T, but if you could isolate the exact place in Command-T that is causing this to manifest I'd love to figure out a way to suppress it. I also wonder whether rebuilding Command-T (or Vim) might make it go away (perhaps something linked against a version of that Gem and since then got rebuilt against a different version).

wincent avatar Feb 06 '18 00:02 wincent

Are you using RVM? I had the same issue and noticed that if I run $ rvm use system before entering vim, then warning messages go away. It's not a permanent fix, but it might help you find the root cause.

jgplane avatar Apr 09 '18 21:04 jgplane

I just filed what may be a duplicate of this issue: #330

If I rvm into the version that command-t and vim were compiled against I don't get the issue at all. But any other version I use via rvm shows the same behavior. And it's different gems for each of the versions, too.

By way of example after issuing rvm use 2.4.1, then going to vim and triggering command-t, I'm getting:

Ignoring bindex-0.5.0 because its extensions are not built. Try: gem pristine bindex --version 0.5.0
Ignoring byebug-9.1.0 because its extensions are not built. Try: gem pristine byebug --version 9.1.0
Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem pristine executable-hooks --version 1.3.2
Ignoring ffi-1.9.18 because its extensions are not built. Try: gem pristine ffi --version 1.9.18
Ignoring gem-wrappers-1.3.1 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.3.1
Ignoring nio4r-2.1.0 because its extensions are not built. Try: gem pristine nio4r --version 2.1.0
Ignoring nokogiri-1.8.0 because its extensions are not built. Try: gem pristine nokogiri --version 1.8.0
Ignoring pg-0.21.0 because its extensions are not built. Try: gem pristine pg --version 0.21.0
Ignoring puma-3.10.0 because its extensions are not built. Try: gem pristine puma --version 3.10.0
Ignoring sqlite3-1.3.13 because its extensions are not built. Try: gem pristine sqlite3 --version 1.3.13
Ignoring unf_ext-0.0.7.4 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.7.4
Ignoring websocket-driver-0.6.5 because its extensions are not built. Try: gem pristine websocket-driver --version 0.6.5```

Whereas if I do `rvm use 2.5.0` and then open vim with `mvim .` and hit `<leader>-t` I get no errors.

lightcap avatar Apr 15 '18 00:04 lightcap

Are you using RVM? I had the same issue and noticed that if I run $ rvm use system before entering vim, then warning messages go away. It's not a permanent fix, but it might help you find the root cause.

I can also verify that using rvm use system results in no gem errors as above. So it seems that it's both the version compiled against and system that are fine. Any other version using rvm has at least one error.

lightcap avatar Apr 15 '18 00:04 lightcap

I have the same problem and solved. Try this: sudo gem pristine ffi

Siemingfong avatar Jan 31 '19 09:01 Siemingfong

I had the same issue. The following command worked for me:

rvm use system

Pratiquea avatar Dec 25 '19 23:12 Pratiquea

I have the same problem and solved. Try this: sudo gem pristine ffi

I did this and got more problems now((

package configuration for libffi is not found
"xcrun clang -o conftest -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin20 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/backward -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib -L. -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.Internal.sdk/usr/local/lib   -arch arm64e -arch x86_64   -lruby.2.6   "
In file included from conftest.c:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found
#include "ruby/config.h"
         ^~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: note: did not find header 'config.h' in framework 'ruby' (loaded from '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks')
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */


vitata78 avatar Aug 13 '20 17:08 vitata78

@vitata78 try this one https://github.com/ffi/ffi/issues/844#issuecomment-733957054

designervoid avatar Nov 26 '20 12:11 designervoid

I have the same problem and solved. Try this: sudo gem pristine ffi

Thank you so much for the solution! 🪄 It worked just fine. I was stuck with this warning since yesterday.

KushalBhanot avatar Jan 31 '21 06:01 KushalBhanot

Had thes same issue with system ruby with rbenv installed after Big Sur 11.2.1 update. Fixing rbenv gem won't help. System gem needed a fix. Fixed with: rbenv use system && sudo gem pristine ffi

127 avatar Feb 24 '21 10:02 127

same problem with Xcode 13 - macOS 12.0 Beta unable to install cocoapods > 1.8.4 & sudo gem pristine ffi not working in my case.

DevanshiGor avatar Oct 05 '21 10:10 DevanshiGor

Try this CocoaPods/CocoaPods#10103 (comment). Success on Monterey Beta 10 - Xcode 13 (Comment says it also success on Big Sur).

Baneeishaque avatar Oct 22 '21 23:10 Baneeishaque

Thanks @Baneeishaque but not working in my case :(

DevanshiGor avatar Oct 23 '21 05:10 DevanshiGor

Run in de project folder

sudo gem install cocoapods to update cocoapods

sudo gem pristine ffi to install/update de package

pod repo update to update all repositories end dependencies

pod install to install all repositories end dependencies

run your app and be happy

Given the big rewrite for v6.0.x, I'm closing all older issues as there is unlikely to be anything significant happening on the 5-x-devel branch from here on[^patches]. Feedback issue for 6.0.x is here:

  • https://github.com/wincent/command-t/issues/393

[^patches]: Patches and PRs would be welcome, but my personal efforts are going to be directed towards main.

wincent avatar Aug 26 '22 21:08 wincent