jaro_winkler icon indicating copy to clipboard operation
jaro_winkler copied to clipboard

MacOS install failture

Open zzj0402 opened this issue 5 years ago • 3 comments

Reproduce

sudo gem install jaro_winkler

Environment

MacOS Mojave 10.14.5 (18F2059)

Output

Building native extensions. This could take a while...
ERROR:  Error installing jaro_winkler:
	ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.3.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -I /Library/Ruby/Site/2.3.0 -r ./siteconf20191212-98820-dz3tkp.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/jaro_winkler-1.5.4 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/jaro_winkler-1.5.4/gem_make.out

zzj0402 avatar Dec 12 '19 06:12 zzj0402

Hi @zzj0402,

Your issue might be caused by the building environment instead of jaro_winkler gem itself. I wonder if you are able to install any other native extension with your Mojave environment. For example:

sudo gem install nokogiri

tonytonyjan avatar Dec 17 '19 13:12 tonytonyjan

I switched from ruby 2.7.0 to 2.7.2 locally to fix it. Maybe you can go to 2.3:latest?

dennisvandehoef avatar Feb 16 '21 13:02 dennisvandehoef

It seems there's a problem with Xcode's ruby, which prevents this gem from installing. Symlinking the expected ruby version solved the problem for me. See https://stackoverflow.com/questions/63729369/commonmarker-gem-cannot-be-installed-needed-for-jekyll-macos

parluciaga avatar May 27 '22 17:05 parluciaga