I’m using Mac OS Big Sur with Xcode 13.2.1. I would like to run rdebug-ide in my Rails 6 (Ruby 3.0.2) app but not quite sure what version of debase I need, which is a requirement to install rdebug-ide as I understand it. When I try to install the debase gem, I get the errors …

$ gem install debase
Building native extensions. This could take a while...
ERROR:  Error installing debase:
    ERROR: Failed to build gem native extension.

    current directory: /Users/myuser/.rvm/gems/ruby-3.0.2@myproject-web/gems/debase-0.2.4.1/ext
/Users/myuser/.rvm/rubies/ruby-3.0.2/bin/ruby -I /Users/myuser/.rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0 -r ./siteconf20220225-44605-qb8h1c.rb extconf.rb
checking for vm_core.h... yes
checking for iseq.h... yes
checking for version.h... yes
checking for vm_core.h... yes
checking for vm_insnhelper.h... yes
checking for vm_core.h... yes
checking for method.h... yes
creating Makefile

current directory: /Users/myuser/.rvm/gems/ruby-3.0.2@myproject-web/gems/debase-0.2.4.1/ext
make DESTDIR\= clean

current directory: /Users/myuser/.rvm/gems/ruby-3.0.2@myproject-web/gems/debase-0.2.4.1/ext
make DESTDIR\=
compiling breakpoint.c
compiling context.c
compiling debase_internals.c
debase_internals.c:111:8: error: implicit declaration of function 'RHASH_EMPTY_P' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  if (!RHASH_EMPTY_P(catchpoints)) return;
       ^
debase_internals.c:319:25: warning: initializing 'rb_control_frame_t *' (aka 'struct rb_control_frame_struct *') with an expression of type 'const rb_control_frame_t *' (aka 'const struct rb_control_frame_struct *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
    rb_control_frame_t *start_cfp = RUBY_VM_END_CONTROL_FRAME(TH_INFO(thread));
                        ^           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
debase_internals.c:768:3: warning: incompatible function pointer types passing 'void (VALUE, VALUE)' (aka 'void (unsigned long, unsigned long)') to parameter of type 'VALUE (*)(VALUE, VALUE)' (aka 'unsigned long (*)(unsigned long, unsigned long)') [-Wincompatible-function-pointer-types]
  rb_define_module_function(mDebase, "set_trace_flag_to_iseq", Debase_set_trace_flag_to_iseq, 1);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/myuser/.rvm/rubies/ruby-3.0.2/include/ruby-3.0.0/ruby/internal/anyargs.h:337:142: note: expanded from macro 'rb_define_module_function'
#define rb_define_module_function(mod, mid, func, arity)    RBIMPL_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), (func), (arity))
                                                                                                                                             ^~~~~~
/Users/myuser/.rvm/rubies/ruby-3.0.2/include/ruby-3.0.0/ruby/internal/anyargs.h:273:1: note: passing argument to parameter here
RBIMPL_ANYARGS_DECL(rb_define_module_function, VALUE, const char *)
^
/Users/myuser/.rvm/rubies/ruby-3.0.2/include/ruby-3.0.0/ruby/internal/anyargs.h:255:72: note: expanded from macro 'RBIMPL_ANYARGS_DECL'
RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); \
                                                                       ^
debase_internals.c:771:3: warning: incompatible function pointer types passing 'void (VALUE, VALUE)' (aka 'void (unsigned long, unsigned long)') to parameter of type 'VALUE (*)(VALUE, VALUE)' (aka 'unsigned long (*)(unsigned long, unsigned long)') [-Wincompatible-function-pointer-types]
  rb_define_module_function(mDebase, "unset_iseq_flags", Debase_unset_trace_flags, 1);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/myuser/.rvm/rubies/ruby-3.0.2/include/ruby-3.0.0/ruby/internal/anyargs.h:337:142: note: expanded from macro 'rb_define_module_function'
#define rb_define_module_function(mod, mid, func, arity)    RBIMPL_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), (func), (arity))
                                                                                                                                             ^~~~~~
/Users/myuser/.rvm/rubies/ruby-3.0.2/include/ruby-3.0.0/ruby/internal/anyargs.h:273:1: note: passing argument to parameter here
RBIMPL_ANYARGS_DECL(rb_define_module_function, VALUE, const char *)
^
/Users/myuser/.rvm/rubies/ruby-3.0.2/include/ruby-3.0.0/ruby/internal/anyargs.h:255:72: note: expanded from macro 'RBIMPL_ANYARGS_DECL'
RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); \
                                                                       ^
3 warnings and 1 error generated.
make: *** [debase_internals.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/myuser/.rvm/gems/ruby-3.0.2@myproject-web/gems/debase-0.2.4.1 for inspection.
Results logged to /Users/myuser/.rvm/gems/ruby-3.0.2@myproject-web/extensions/x86_64-darwin-20/3.0.0/debase-0.2.4.1/gem_make.out

Not sure where else to go to get this thing installed.

1

There are 1 best solutions below

0
On BEST ANSWER

I was able to install successfully on Mac Big Sur with my Rails 6.1.4, Ruby 3 project with these gems ...

group :development do
  ...

  gem 'debase-ruby_core_source'
  gem 'debase', '0.2.5.beta2'
  gem 'ruby-debug-ide'
end