Lorsque je construisais un environnement ruby sur un Macbook Pro 13 pouces (modèle 2020), je suis tombé sur l'installation d'une gemme de débogage.
Catalina 10.15.4
Présentez le gem pour le débogage via le bundler.
python
$ gem install bundler
$ bundle init
$ gem install debase
$ gem install ruby-debug-ide
Je lance une erreur.
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
Après examen, il semble que debase-ruby_core_source et ruby version 2.6.3 ne soient pas cohérents. Par conséquent, j'ai changé la version de ruby.
python
$ brew update
$ brew install rbenv
$ rbenv --version
rbenv 1.1.2
$ rbenv install 2.6.6
$ rbenv global 2.6.6
Vous pouvez maintenant installer en toute sécurité la gemme de débogage.
Recommended Posts