[RUBY] What to do if the debug gem installation fails

When I was building a ruby environment on a Macbook Pro 13 inch (2020 model), I stumbled upon installing a debug gem.

Environment executed this time

Catalina 10.15.4

Introducing Gem for debugging

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

What to do if the debug gem installation fails
What to do if the server tomcat dies
What to do if mvn archetype: generate fails
What to do if the Rails server can't start
What to do if password authentication fails in Docker/Postgres
What to do if you get To install the missing version, run `gem install bundler: 2.1.4`
What to do if ffi installation fails when launching an application in Rails
What to do if the adb command cannot be executed
What to do if you can't use the rails command
[Ubuntu 20.04] What to do if the external monitor is not recognized
What to do if validation doesn't work with the update action
What to do if the Rails page doesn't appear in Rails tutorial 1.3.2
What to do if Cloud9 is full in the Rails tutorial
What to do if the Eclipse Maven dependency Jar is wrong
What to do if you install Ubuntu
What to do if you forget the root password in CentOS7
What to do if you cannot roll back the migration (UnknownMigrationVersionError)
Notes on what to do if Ubuntu 20.04 installation on Virtual box 6.1 (Windows10) fails with "Error 5 Input / output error"
What to do if the background image is not applied after deployment
What to do if the prefix c is not bound in JSP
What to do if you can't install the plugin from the Eclipse marketplace
What to do if deployment fails on Heroku (Ruby app not detected)
What to do if you don't like the code generated by swagger-codegen-cli
What to do if you push incorrect information
[August 2020] If the installation of cool.io / puma fails
[Rails / Docker] What to do if access is denied by the browser (localhost: 3000) after adding a gem
What to do if you can't activate the select box created by bootstrap-select
What to do if you get the error message unrecognized selector send to instance "***"
What to do if the changes are not reflected in the jar manifest file
[Swift] What to do if the app icon is set but not reflected
What to do if Docker Desktop fails to launch on your M1 MacBook Pro
What to do if build from command line fails in Android development environment
What to do if the rails server doesn't run out on AWS cloud9
What to do if the build fails with the error "Module compiled with Swift x.x.x cannot be imported by the Swift x.x.x compiler"
What to do when The SSL certificate has expired
What to do if ClassNotFoundException occurs when starting Tomcat
What to do if rails server can't be stopped
What to do if TextToSpeech doesn't work on Android 11
What should I do to reload the updated Dockerfile?
What to do if you accidentally create a model
What to do if you have enabled Use the WSL2 based engine in Docker Desktop with insufficient WSL2 installation
What to do if an ActionController :: UnknownFormat error occurs
What to do if the update does not take effect after deploying Rails AWS
What to do if you can't get the text of an element in Selenium
What to do if you get the error Couldn't find Item without an ID
What to do if the JSONHint annotation does not work with lombok and JSONIC
What to do if the breakpoint is shaded and does not stop during debugging
What to do if you cannot execute with the command "Java package name / class name"
What to do if you get a java.io.IOException in GlassFish
What to do if audio is not available on discordrb
What to do if FacesMessage is set but not displayed
How to validate subsequent tests even if the test fails
# What to do if you accidentally do rails db: migrate: drop
What to do if mysql2 gets a bundle install error
What to do if you don't see the test code error message in the terminal console
[Rails] What to do if you accidentally install bundle in the production environment in your local environment
What to do if you change the Listen Address from the settings screen with Mattermost docker
What to do if you installed Ruby with rbenv but the version does not change
[Rails] What to do if you can't get an error message with the errors method
What to do if you get a gcc error in Docker
[Rails] What to do if data is not registered in DB