Cannot install Rubymine Debugger

已回答

Hi,i get the following error when i try to install ruby debugger(from right click menu):

 

Error running 'main': Failed to Install Gems. Following gems were not installed: /home/z/Documents/RubyMine-2017.2.4/rb/gems/ruby-debug-ide-0.6.1.beta9.gem: Error installing ruby-debug-ide-0.6.1.beta9.gem: ERROR: Failed to build gem native extension. current directory: /home/z/.gem/ruby/2.3.0/gems/ruby-debug-ide-0.6.1.beta9/ext /usr/bin/ruby2.3 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: /var/lib/gems/2.3.0/gems/debase-0.2.2.beta11/ext /usr/bin/ruby2.3 -r ./siteconf20171122-14132-qyaynn.rb extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h extconf failed, exit code 1 Gem files will remain installed in /var/lib/gems/2.3.0/gems/debase-0.2.2.beta11 for inspection. Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/debase-0.2.2.beta11/gem_make.out /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:92:in `run' /usr/lib/ruby/2.3.0/rubygems/ext/ext_conf_builder.rb:48:in `block in build' /usr/lib/ruby/2.3.0/tempfile.rb:295:in `open' /usr/lib/ruby/2.3.0/rubygems/ext/ext_conf_builder.rb:31:in `build' /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:164:in `block (2 levels) in build_extension' /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:163:in `chdir' /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:163:in `block in build_extension' /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:162:in `synchronize' /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:162:in `build_extension' /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:201:in `block in build_extensions' /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:198:in `each' /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:198:in `build_extensions' /usr/lib/ruby/2.3.0/rubygems/installer.rb:748:in `build_extensions' /usr/lib/ruby/2.3.0/rubygems/installer.rb:297:in `install' /usr/lib/ruby/2.3.0/rubygems/resolver/specification.rb:97:in `install' /usr/lib/ruby/2.3.0/rubygems/request_set.rb:166:in `block in install' /usr/lib/ruby/2.3.0/rubygems/request_set.rb:156:in `each' /usr/lib/ruby/2.3.0/rubygems/request_set.rb:156:in `install' /usr/lib/ruby/2.3.0/rubygems/dependency_installer.rb:405:in `install' mkrf_conf.rb:35:in `rescue in  ' mkrf_conf.rb:28:in ` ' rake failed, exit code 1 Gem files will remain installed in /home/z/.gem/ruby/2.3.0/gems/ruby-debug-ide-0.6.1.beta9 for inspection. Results logged to /home/z/.gem/ruby/2.3.0/extensions/x86_64-linux/2.3.0/ruby-debug-ide-0.6.1.beta9/gem_make.out /home/z/Documents/RubyMine-2017.2.4/rb/gems/debase-0.2.2.beta10.gem: Error installing debase-0.2.2.beta10.gem: ERROR: Failed to build gem native extension. current directory: /home/z/.gem/ruby/2.3.0/gems/debase-0.2.2.beta10/ext /usr/bin/ruby2.3 -r ./siteconf20171122-14144-qsfeai.rb extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h extconf failed, exit code 1 Gem files will remain installed in /home/z/.gem/ruby/2.3.0/gems/debase-0.2.2.beta10 for inspection. Results logged to /home/z/.gem/ruby/2.3.0/extensions/x86_64-linux/2.3.0/debase-0.2.2.beta10/gem_make.out

 

I am running on Kubuntu 17.10 (Based on ubuntu 17.10)

0

Hello,

Could you please try this workaround: install gem 'debase-ruby_core_source' into SDK and try again to install debug gems. If it doesn't help please attach two log files: '/home/z/.gem/ruby/2.3.0/extensions/x86_64-linux/2.3.0/debase-0.2.2.beta10/gem_make.out'  and '/home/z/.gem/ruby/2.3.0/extensions/x86_64-linux/2.3.0/ruby-debug-ide-0.6.1.beta9/gem_make.out.

Thanks.

 

0

I installed that gem,still same error(s).here are the logs you requested.

 

/home/z/.gem/ruby/2.3.0/extensions/x86_64-linux/2.3.0/debase-0.2.2.beta10/gem_make.out

 

current directory: /home/z/.gem/ruby/2.3.0/gems/debase-0.2.2.beta10/ext
/usr/bin/ruby2.3 -r ./siteconf20171123-2912-3bbmh9.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

 

 

----------------

/home/z/.gem/ruby/2.3.0/extensions/x86_64-linux/2.3.0/ruby-debug-ide-0.6.1.beta9/gem_make.out

 

 

current directory: /home/z/.gem/ruby/2.3.0/gems/ruby-debug-ide-0.6.1.beta9/ext
/usr/bin/ruby2.3 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: /var/lib/gems/2.3.0/gems/debase-0.2.2.beta11/ext
/usr/bin/ruby2.3 -r ./siteconf20171123-2901-tble2y.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/debase-0.2.2.beta11 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/debase-0.2.2.beta11/gem_make.out
/usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:92:in `run'
  /usr/lib/ruby/2.3.0/rubygems/ext/ext_conf_builder.rb:48:in `block in build'
  /usr/lib/ruby/2.3.0/tempfile.rb:295:in `open'
  /usr/lib/ruby/2.3.0/rubygems/ext/ext_conf_builder.rb:31:in `build'
  /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:164:in `block (2 levels) in build_extension'
  /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:163:in `chdir'
  /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:163:in `block in build_extension'
  /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:162:in `synchronize'
  /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:162:in `build_extension'
  /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:201:in `block in build_extensions'
  /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:198:in `each'
  /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:198:in `build_extensions'
  /usr/lib/ruby/2.3.0/rubygems/installer.rb:748:in `build_extensions'
  /usr/lib/ruby/2.3.0/rubygems/installer.rb:297:in `install'
  /usr/lib/ruby/2.3.0/rubygems/resolver/specification.rb:97:in `install'
  /usr/lib/ruby/2.3.0/rubygems/request_set.rb:166:in `block in install'
  /usr/lib/ruby/2.3.0/rubygems/request_set.rb:156:in `each'
  /usr/lib/ruby/2.3.0/rubygems/request_set.rb:156:in `install'
  /usr/lib/ruby/2.3.0/rubygems/dependency_installer.rb:405:in `install'
  mkrf_conf.rb:35:in `rescue in <main>'
  mkrf_conf.rb:28:in `<main>'

rake failed, exit code 1

0

Thanks for the information. We are investigation possible reason. As a workaround please install gems manually in the Terminal:

gem install ruby-debug-ide -v 0.6.1.beta9

gem install debase -v 0.2.2.beta11

Let me know if it's still doesn't work.

0

Both failed :(

 

z@z-desktop:~$ sudo gem install ruby-debug-ide -v 0.6.1.beta9
[sudo] password for z:
Building native extensions.  This could take a while...
ERROR:  Error installing ruby-debug-ide:
        ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.3.0/gems/ruby-debug-ide-0.6.1.beta9/ext
/usr/bin/ruby2.3 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: /var/lib/gems/2.3.0/gems/debase-0.2.2.beta11/ext
/usr/bin/ruby2.3 -r ./siteconf20171124-3731-nb677m.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/debase-0.2.2.beta11 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/debase-0.2.2.beta11/gem_make.out
/usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:92:in `run'
  /usr/lib/ruby/2.3.0/rubygems/ext/ext_conf_builder.rb:48:in `block in build'
  /usr/lib/ruby/2.3.0/tempfile.rb:295:in `open'
  /usr/lib/ruby/2.3.0/rubygems/ext/ext_conf_builder.rb:31:in `build'
  /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:164:in `block (2 levels) in build_extension'
  /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:163:in `chdir'
  /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:163:in `block in build_extension'
  /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:162:in `synchronize'
  /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:162:in `build_extension'
  /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:201:in `block in build_extensions'
  /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:198:in `each'
  /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:198:in `build_extensions'
  /usr/lib/ruby/2.3.0/rubygems/installer.rb:748:in `build_extensions'
  /usr/lib/ruby/2.3.0/rubygems/installer.rb:297:in `install'
  /usr/lib/ruby/2.3.0/rubygems/resolver/specification.rb:97:in `install'
  /usr/lib/ruby/2.3.0/rubygems/request_set.rb:166:in `block in install'
  /usr/lib/ruby/2.3.0/rubygems/request_set.rb:156:in `each'
  /usr/lib/ruby/2.3.0/rubygems/request_set.rb:156:in `install'
  /usr/lib/ruby/2.3.0/rubygems/dependency_installer.rb:405:in `install'
  mkrf_conf.rb:35:in `rescue in <main>'
  mkrf_conf.rb:28:in `<main>'

rake failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/ruby-debug-ide-0.6.1.beta9 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/ruby-debug-ide-0.6.1.beta9/gem_make.out
z@z-desktop:~$ sudo gem install debase -v 0.2.2.beta11
Building native extensions.  This could take a while...
ERROR:  Error installing debase:
        ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.3.0/gems/debase-0.2.2.beta11/ext
/usr/bin/ruby2.3 -r ./siteconf20171124-3775-vmzk1i.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/debase-0.2.2.beta11 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/debase-0.2.2.beta11/gem_make.out

0

Hello,

could you please check how it goes after running the following:

sudo apt-get install ruby-dev
0

I'm running into the same error on Ruby 2.5.0. According to https://github.com/denofevil/debase/issues/54, only 0.2.2.beta14 is compatible with Ruby 2.5.0, at the moment.

 

UPDATE

Actually, it looks like the suggested workaround of installing the debase-ruby_core_source gem gets my debug configurations to boot.

0

@Matt, do you still experience the problem with debugger?

0

I'm experiencing the same issues as OP.  None of the work arounds have worked.

0

@Olga, installing the debase-ruby_core_source gem worked for me.

0

For those who come via Google here:
As --no-doc are deprecated you have to use --no-document instead.
--no-rdoc is not a valid parameter and wouldn't work.  This issue was in RubyMine 2018.1 but is happily fixed in 2018.5 if you are running into this problem upgrade your RubyMine installation.

1

When is this fix being backported into the 2017 version of RubyMine?

0

@Joe

if you mean https://youtrack.jetbrains.com/issue/RUBY-23101 then you can manually install the latest versions of ruby-debug-ide and debase gems.

0

That's just a workaround, though.

--no-doc is deprecated and RubyMine should be fixed to use --no-document instead

0

Sincerely I just installed `brew rbenv`, then i installed ruby 2.6.5, `rbenv install 2.6.5`, `rbenv global 2.6.5`, `rbenv rehash`, `ruby --version` should now show 2.6.5. Then give full permissions to .rbenv `sudo chmod -R 777 ~/.rbenv`. I resolved this 2 times and first time i didn't document how i did exactly. This last one is a blunt resolve.

I also had an issue with puma gem not installing so running `gem install puma:4.3.5 -- --with-cflags="-Wno-error=implicit-function-declaration"` worked charms

0

I oddly had this issue come up today in RubyMine 2021.2.2, using a ruby 2.5.3 SDK installed with rbenv. 

Trying to install the debugger gems with the UI was giving an error that looked like this:

Failed to Install Gems. Following gems were not installed
/Applications/RubyMine.app/Contents/plugins/ruby/rb/gems/ruby-debug-ide-2.3.1.gem: While executing gem ... (OptionParser::InvalidOption)invalid option: --no-rdoc
/Applications/RubyMine.app/Contents/plugins/ruby/rb/gems/debase-2.3.2.gem: While executing gem ... (OptionParser::InvalidOption) invalid option: --no-rdoc

The other steps given to resolve did not fix.

 

I was able to get it working by uninstalling and reinstalling RubyMine. Then everything worked perfectly, as expected. 

0

solved for me like this:

sudo gem install --local /[path_to_idea_plugins]/plugins/ruby/rb/gems/ruby-debug-ide-2.3.1.gem

cp -R /[path_to_my_ruby_gems]/gems/ruby-debug-ide-* /[path_to_ide_plugins]/plugins/ruby/rb/gems/

same operations for debase

for example im my case:

path_to_idea_plugins = /Applications/RubyMine.app/Contents

path_to_my_ruby_gems = /usr/local/lib/ruby/gems/2.3.0/gems

0

Found this thread when RubyMine failed to install the debugger on macOS. 

For me it didn't like that I had changed the global Ruby version with rbenv, so I fixed it by changing back to the system default Ruby version with:

rbenv global system

and restarted RubyMine.

0

请先登录再写评论。