15

There seems to be a recursion effect when installing debugger by gem install debugger -v '1.6.8' it says it is successful installing, but the message reappears when i do bundle install or bundle update

|20:15:37| ~ gem install debugger -v '1.6.8'
Building native extensions.  This could take a while...
Successfully installed debugger-1.6.8
Parsing documentation for debugger-1.6.8
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for lib/ruby_debug.bundle, skipping
1 gem installed
|20:15:55| ~ bundle install
Fetching gem metadata from https://rubygems.org/.......
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies......
Using rake 10.3.2
Using Ascii85 1.0.2
Using i18n 0.6.9

...

Using coffee-script 2.2.0
Using coffee-rails 3.2.2
Using colored 1.2
Using commonjs 0.2.7
Using coolline 0.4.4
Using debugger-ruby_core_source 1.3.5

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for rb_method_entry_t.called_id in method.h... no
checking for rb_control_frame_t.method_id in method.h... no
checking for rb_method_entry_t.called_id in method.h... no
checking for rb_control_frame_t.method_id in method.h... no
checking for rb_method_entry_t.called_id in method.h... yes
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.0/usr/bin/ruby
    --with-ruby-dir
    --without-ruby-dir
    --with-ruby-include
    --without-ruby-include=${ruby-dir}/include
    --with-ruby-lib
    --without-ruby-lib=${ruby-dir}/

extconf failed, exit code 1

Gem files will remain installed in /var/folders/mp/tl8cpc_j0vd504t3npnqxzl00000gn/T/bundler20140630-67837-rxj9rk/debugger-1.6.8/gems/debugger-1.6.8 for inspection.
Results logged to /var/folders/mp/tl8cpc_j0vd504t3npnqxzl00000gn/T/bundler20140630-67837-rxj9rk/debugger-1.6.8/extensions/universal-darwin-13/2.0.0/debugger-1.6.8/gem_make.out
An error occurred while installing debugger (1.6.8), and Bundler cannot continue.
Make sure that `gem install debugger -v '1.6.8'` succeeds before bundling.
|20:17:56| ~

I have tried bundle update debugger-ruby_core_source and rm Gemfile.lock then bundle install

Beast_Code
  • 3,097
  • 12
  • 43
  • 54
  • 1
    `checking for iseq.h` this is the relevant part... you could google on that phrase. But it sounds like you're missing some kind of headers. are you on mac? linux? (it helps us to know your OS when install errors occur) if the latter - you're probably missing a development library of some sort. – Taryn East Jul 01 '14 at 00:40
  • @TarynEast I'm on OSX 10.9.3 – Beast_Code Jul 01 '14 at 01:52
  • I Google the phrase but I could not find anything relevant. – Beast_Code Jul 01 '14 at 01:56
  • I googled for `checking for iseq.h OSX gem install debugger` and got this: http://stackoverflow.com/questions/19638810/cant-install-debugger-gem-rails-mac-osx-mavericks – Taryn East Jul 01 '14 at 01:59
  • 4
    The debugger gem does not support Ruby 2.0+, use [byebug](https://github.com/deivid-rodriguez/byebug) instead. – Andrew Marshall Jul 01 '14 at 02:12
  • @TarynEast i found that as well but from my understanding it does not take me anywhere. – Beast_Code Jul 01 '14 at 03:02
  • @AndrewMarshall i installed the gem, but how do stop the other debugger from trying to install? – Beast_Code Jul 01 '14 at 03:07
  • It's a Rails project I guess so why do you try installing gems manually? Just update a Gemfile (if you have version locked in there), or even just run `bundle update debugger` – Mike Szyndel Jul 01 '14 at 08:18
  • @MichalSzyndel I'm a newbie as you can see. I'll try that. – Beast_Code Jul 01 '14 at 15:38

3 Answers3

39

Please replace

gem 'pry-debugger'

with

gem 'pry-byebug'

Thanks!

FastSolutions
  • 1,809
  • 1
  • 25
  • 49
3

debugger gem doesn't work with Ruby 2.1+. Instead try byebug.

Prabhakar
  • 6,458
  • 2
  • 40
  • 51
1

if you don't want to change dependencies you can try this:

I worked around this by dropping my version of ruby from 2.1.3 to ruby 1.9.3p545 on yosemite

gem 'pry-byebug' is compatible with 2.0, where pry-debugger is not

Community
  • 1
  • 1
random-forest-cat
  • 33,652
  • 11
  • 120
  • 99