<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">All—<div class=""><br class=""></div><div class="">I’ve installed Ruby with <font face="Menlo" class=""><span style="font-style: normal;" class="">sudo port install ruby31</span></font> and want to install <a href="https://middlemanapp.com" class="">middleman</a> with <font face="Menlo" class=""><span style="font-style: normal;" class="">sudo gem install middleman</span></font>. This gives an error that header files for building gems are not present in /opt/local/lib/ruby3.1/include:</div><div class=""><br class=""></div><div class=""><span style="font-family: Menlo;" class="">Building native extensions. This could take a while...</span></div><div class=""><font face="Menlo" class=""><span style="font-style: normal;" class="">ERROR:  Error installing middleman:<br class=""><span class="Apple-tab-span" style="white-space:pre">   </span>ERROR: Failed to build gem native extension.<br class=""><br class="">    current directory: /opt/local/lib/ruby3.1/gems/3.1.0/gems/ffi-1.15.4/ext/ffi_c<br class="">/opt/local/bin/ruby3.1 -I /opt/local/lib/ruby3.1/3.1.0 -r ./siteconf20220102-15848-cuiju7.rb extconf.rb<br class="">mkmf.rb can't find header files for ruby at /opt/local/lib/ruby3.1/include/ruby.h<br class=""><br class="">You might have to install separate package for the ruby development<br class="">environment, ruby-dev or ruby-devel for example.<br class=""><br class="">extconf failed, exit code 1<br class=""><br class="">Gem files will remain installed in /opt/local/lib/ruby3.1/gems/3.1.0/gems/ffi-1.15.4 for inspection.<br class="">Results logged to /opt/local/lib/ruby3.1/gems/3.1.0/extensions/arm64-darwin-21/3.1.0/ffi-1.15.4/gem_make.out<br class=""></span></font><br class=""></div><div class="">What MacPorts package(s) do I need for installing these headers? I’ve had no luck searching on <a href="https://ports.macports.org/" class="">https://ports.macports.org/</a> for ruby.h</div><div class=""><br class=""></div><div class="">Cheers,</div><div class=""><br class=""></div><div class="">Andreas</div></body></html>