Can't install rdebug gem


#1

Hi guys,

As the title says I’m having trouble installing rdebug gem. Below is the output I get in my terminal:

MacBook-Pro-de-Stephen:~ stephenlang$ gem install ruby-debug-ide
Building native extensions. This could take a while…
ERROR: Error installing ruby-debug-ide:
ERROR: Failed to build gem native extension.

current directory: /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/ruby-debug-ide-0.6.1/ext

/Users/stephenlang/.rbenv/versions/2.5.1/bin/ruby mkrf_conf.rb
Installing base gem
Building native extensions. This could take a while…
Building native extensions. This could take a while…
ERROR: Failed to build gem native extension.

current directory: /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/debase-0.2.3.beta5/ext

/Users/stephenlang/.rbenv/versions/2.5.1/bin/ruby -r ./siteconf20190303-47502-1m85nrg.rb extconf.rb
checking for vm_core.h… *** 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/stephenlang/.rbenv/versions/2.5.1/bin/$(RUBY_BASE_NAME)
–with-ruby-dir
–without-ruby-dir
–with-ruby-include=${ruby-dir}/include
–with-ruby-lib
–without-ruby-lib=${ruby-dir}/lib
/Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/mkmf.rb:456:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/mkmf.rb:590:intry_cpp’
from /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/mkmf.rb:1097:in block in have_header' from /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/mkmf.rb:947:inblock in checking_for’
from /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/mkmf.rb:350:in block (2 levels) in postpone' from /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/mkmf.rb:320:inopen’
from /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/mkmf.rb:350:in block in postpone' from /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/mkmf.rb:320:inopen’
from /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/mkmf.rb:346:in postpone' from /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/mkmf.rb:946:inchecking_for’
from /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/mkmf.rb:1096:in have_header' from extconf.rb:31:inblock in ’
from /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/debase-ruby_core_source-0.10.4/lib/debase/ruby_core_source.rb:15:in create_makefile_with_core' from extconf.rb:53:in

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-15/2.5.0-static/debase-0.2.3.beta5/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/debase-0.2.3.beta5 for inspection.
Results logged to /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-15/2.5.0-static/debase-0.2.3.beta5/gem_make.out
/Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/ext/builder.rb:92:in run' /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/ext/ext_conf_builder.rb:46:inblock in build’
/Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/tempfile.rb:295:in open' /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/ext/ext_conf_builder.rb:30:inbuild’
/Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/ext/builder.rb:164:in block (2 levels) in build_extension' /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/ext/builder.rb:163:inchdir’
/Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/ext/builder.rb:163:in block in build_extension' /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/ext/builder.rb:162:insynchronize’
/Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/ext/builder.rb:162:in build_extension' /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/ext/builder.rb:201:inblock in build_extensions’
/Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/ext/builder.rb:198:in each' /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/ext/builder.rb:198:inbuild_extensions’
/Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/installer.rb:774:in build_extensions' /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/installer.rb:306:ininstall’
/Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/resolver/specification.rb:97:in install' /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/request_set.rb:168:inblock in install’
/Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/request_set.rb:156:in each' /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/request_set.rb:156:ininstall’
/Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/dependency_installer.rb:409:in install' mkrf_conf.rb:35:inrescue in ’
mkrf_conf.rb:28:in `’

rake failed, exit code 1

Gem files will remain installed in /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/ruby-debug-ide-0.6.1 for inspection.
Results logged to /Users/stephenlang/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-15/2.5.0-static/ruby-debug-ide-0.6.1/gem_make.out

Any ideas what is going wrong?


#2

Search for XCode on your computer and open it. Sometimes there’s a new licence agreement you need to accept before it will work properly and will cause this kind of error.


#3

Does XCode need to be installed for this to be installed?


#4

Yeah, you will have installed it as part of the installation instructions.


#6

I don’t see it anywhere in the installation instructions, and do not have it on my computer. Can you link to the instructions you are referencing please?


#7

https://www.theodinproject.com/courses/web-development-101/lessons/installing-ruby

Step 1.2 in the mac dropdown instructions.


#8

Thanks I got it installed and all is working now:)