When I was building a ruby environment on a Macbook Pro 13 inch (2020 model), I stumbled upon installing a debug gem.
Catalina 10.15.4
Introduce a gem for debugging via bundler.
python
$ gem install bundler
$ bundle init
$ gem install debase
$ gem install ruby-debug-ide
I throw an error.
python
uilding native extensions. This could take a while...
ERROR: Error installing debase:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/debase-0.2.4.1/ext
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20200608-81290-fde397.rb extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
**************************************************************************
No source for ruby-2.6.3-p62 (revision 67580) provided with
debase-ruby_core_source gem. Falling back to ruby-2.6.0-p0.
**************************************************************************
checking for vm_core.h... yes
checking for iseq.h... no
Makefile creation failed
*************************************************************
NOTE: If your headers were not found, try passing
--with-ruby-include=PATH_TO_HEADERS
*************************************************************
*** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
--with-ruby-dir
--without-ruby-dir
--with-ruby-include
--without-ruby-include=${ruby-dir}/include
--with-ruby-lib
--without-ruby-lib=${ruby-dir}/lib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/debase-0.2.4.1/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/debase-0.2.4.1 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/debase-0.2.4.1/gem_make.out
Upon examination, it seems that debase-ruby_core_source and ruby version 2.6.3 are inconsistent. Therefore, I changed the version of ruby.
python
$ brew update
$ brew install rbenv
$ rbenv --version
rbenv 1.1.2
$ rbenv install 2.6.6
$ rbenv global 2.6.6
You can now safely install the debug gem.
Recommended Posts