danielpclark / faster_path

Faster Pathname handling for Ruby written in Rust
MIT License
782 stars 33 forks source link

Mac OS Cannot bundle install faster_path. Gem::Ext::BuildError: ERROR: Failed to build gem native extension. #181

Open backward-crazy-mage-puppy-36 opened 3 years ago

backward-crazy-mage-puppy-36 commented 3 years ago

Hi. I cannot install faster_path on Mac OS Catalina 10.15 . I have rust installed via curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly . I am using RVM and ruby 3.0.1 with rails 6.1.3. bundle install fails with the following error:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /Users/bcmp36/.rvm/rubies/ruby-3.0.1/lib/ruby/gems/3.0.0/gems/faster_path-0.1.8/ext/faster_path

/Users/bcmp36/.rvm/rubies/ruby-3.0.1/bin/ruby -I /Users/bcmp36/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0 -r ./siteconf20210909-89192-jkrtg1.rb extconf.rb extconf.rb failed Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.

Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/Users/bcmp36/.rvm/rubies/ruby-3.0.1/bin/$(RUBY_BASE_NAME) /Users/bcmp36/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/mkmf.rb:1770:in dir_config': undefined method+' for nil:NilClass (NoMethodError) from /Users/bcmp36/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/mkmf.rb:1122:in have_header' from extconf.rb:3:in

'

extconf failed, exit code 1

Gem files will remain installed in /Users/bcmp36/.rvm/rubies/ruby-3.0.1/lib/ruby/gems/3.0.0/gems/faster_path-0.1.8 for inspection. Results logged to /Users/bcmp36/.rvm/rubies/ruby-3.0.1/lib/ruby/gems/3.0.0/extensions/x86_64-darwin-19/3.0.0/faster_path-0.1.8/gem_make.out

An error occurred while installing faster_path (0.1.8), and Bundler cannot continue. Make sure that gem install faster_path -v '0.1.8' --source 'https://rubygems.org/' succeeds before bundling.