Installation error in MacOS Catalina 10.15.5

I follow the tutorial here :

But still get the following error during installing Jekyll:

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

    current directory: /usr/local/lib/ruby/gems/2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
/usr/local/opt/ruby/bin/ruby -I /usr/local/lib/ruby/site_ruby/2.7.0 -r ./siteconf20200611-38750-1duqmrt.rb extconf.rb
creating Makefile

current directory: /usr/local/lib/ruby/gems/2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR=" clean

current directory: /usr/local/lib/ruby/gems/2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR="
compiling ruby_http_parser.c
compiling ryah_http_parser.c
linking shared-object ruby_http_parser.bundle
ld: unexpected token: !tapi-tbd-v3 file '/Applications/' for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:262: ruby_http_parser.bundle] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/lib/ruby/gems/2.7.0/gems/http_parser.rb-0.6.0 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.7.0/extensions/x86_64-darwin-19/2.7.0/http_parser.rb-0.6.0/gem_make.out

Any suggestion? I also post this in Github Issue. not sure if it’s okay to cross post.

1 Like

Catalina freezes the system gems so you need to use --user-install flag to install in ~/.gems

I wrote a guide here on how to install a custom Ruby version and user gems, not touching the system Ruby. This works for me well on Catalina.

1 Like