cldwalker/debugger

debugger can't be installed on ruby 2.X

eddiefisher opened this issue ยท 35 comments

ruby -v
ruby 2.1.2p80 (2014-03-01 revision 45231) [x86_64-darwin13.0]
gem install debugger -v '1.6.6'
Building native extensions.  This could take a while...
ERROR:  Error installing debugger:
    ERROR: Failed to build gem native extension.

    /Users/eddiefisher/.rvm/rubies/ruby-2.1-head/bin/ruby 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
    --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/eddiefisher/.rvm/rubies/ruby-2.1-head/bin/ruby
/Users/eddiefisher/.rvm/rubies/ruby-2.1-head/lib/ruby/2.1.0/fileutils.rb:1573:in `stat': No such file or directory @ rb_file_s_stat - ./212/ruby_debug.h (Errno::ENOENT)
    from /Users/eddiefisher/.rvm/rubies/ruby-2.1-head/lib/ruby/2.1.0/fileutils.rb:1573:in `block in fu_each_src_dest'
    from /Users/eddiefisher/.rvm/rubies/ruby-2.1-head/lib/ruby/2.1.0/fileutils.rb:1587:in `fu_each_src_dest0'
    from /Users/eddiefisher/.rvm/rubies/ruby-2.1-head/lib/ruby/2.1.0/fileutils.rb:1571:in `fu_each_src_dest'
    from /Users/eddiefisher/.rvm/rubies/ruby-2.1-head/lib/ruby/2.1.0/fileutils.rb:399:in `cp'
    from extconf.rb:83:in `block in <main>'
    from extconf.rb:82:in `each'
    from extconf.rb:82:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /Users/eddiefisher/.rvm/gems/ruby-2.1-head/gems/debugger-1.6.6 for inspection.
Results logged to /Users/eddiefisher/.rvm/gems/ruby-2.1-head/extensions/x86_64-darwin-13/2.1.0/debugger-1.6.6/gem_make.out

Thanks for reporting your issue! This is one of my 16 active issues. Use that link to check how soon your issue will be answered. Don't forget to check your issue against this project's CONTRIBUTING.md. Cheers.

Is this issue ongoing?
I'm just in trouble with the issue.

Yes, I am having this issue with 1.6.6 and against 2.1.2 as well.

Same here. Issue with 1.6.6 with ruby 2.1.2 on OSX 10.9.2

same here!

๐Ÿ‘ and there is a PR for that issue.

Same here....

Support for Ruby 2.1.2p95 would be groovy.

๐Ÿ‘

+1

Same here!

+1

Hey folks, please refrain from posting spammy +1s and pinging everyone subscribed to this thread. I think the point that this is broken on Ruby 2.1.2 has been made and proved, and either someone with the time and knowledge will submit a fix PR or you tackle this and do the same. I don't think putting +1 comments on this thread will speed things up. Thanks!

There's already a PR #126

@cldwalker @astashov @mark-moseley @nobu,
Hey guys, any news from this one?
Thanks.

I've having the same issue.

I am having this problem on linux as well, it's not confined to mac.

For ruby 2.X debugging, I now recommend byebug or debugger2. I've updated the README to indicate this. Reasons for this:

  • debugger has never had full ruby 2.x support. An open call was made to the community more than a year ago but no one stepped up. See #47.
  • The rails community has thrown its weight behind byebug for 2.x debugging.

In a week, I will be closing all ruby2 issues including this one. I will hold off on closing them if someone takes up working on 2.X support. I'm happy to provide github and gem push access as needed.
Is @astashov, @nobu, @sunaku, @windwiny or anyone else interested in adding 2.X support for debugger?

This requires doing the following with ko1's pull request, #69:

  • Resolve merge conflicts. A fair amount has landed on master since the pull request
  • Disable tests and features that have not been ported to 2.x e.g. post-mortem and threading. Disabling should only be done for 2.x rubies.
  • Ensure all tests pass on 2.X rubies
  • No longer depend on ruby internals (see #47 for some discussion). This means there should be no dependence on https://github.com/cldwalker/debugger-ruby_core_source. This should be resolved by the pull request but is important to state nontheless.

I am also looking for 1.9.X maintainers if anyone is interested

What are the pros and cons of byebug vs debugger2?

Our reason for using debugger (with Ruby 2.1) is that pry-debugger currently depends on it. /cc @nixme

@nathany You can use pry-byebug instead of pry-debugger, and that avoids the dependency on debugger. It only supports MRI 2.0.0 or newer.

From its gemspec:

  # Dependencies
  gem.required_ruby_version = '>= 2.0.0'

  gem.add_runtime_dependency 'pry', '~> 0.9.12'
  gem.add_runtime_dependency 'byebug', '~> 2.7'

@nathany https://github.com/deivid-rodriguez/pry-byebug is a fork of pry-debugger that should do the job.

thanks @nixme.

+1 for 2.1.1

Closing since I'm scoping debugger to just 1.9.2 and 1.9.3. For more see above #125 (comment)

I've the same issue with debugger 1.6.6 and 1.6.8with ruby 2.1.2 on OSX 10.9.2.

@icaroseara use byebug instead of debugger. or debugger2.

+1 for Ruby 2.1.3

I believe we are supposed to use byebug for ruby 2+.

it is fixed or still ongoing? every time i try to install pry-byebug or byebug or debugger or debugger2 i get this:

ERROR: Failed to build gem native extension.