0

I am new to Ruby and Gems, Bundler, RVM, etc. although I have been a programmer for many years, including the past 5+ on PHP with PhpStorm.

I want to write a Vagrant Plugin so I wanted to set up debugging with RubyMine 2016.1 for Vagrant without modifying the source code However after hours and hours of trial and error I feel like I am just running around in circles.


I installed RVM and ran rvm install 2.3.0 then rvm use 2.3.0 and then tried to install this gem:

gem install ruby-debug-base19x --pre

And it would fail with these and several other errors:

ERROR:  Error installing ruby-debug-base19x:
ERROR: Failed to build gem native extension.

current directory: /Users/mikeschinkel/.rvm/gems/ruby-2.3.0/gems/ruby-debug-base19x-0.11.31/ext/ruby_debug
/Users/mikeschinkel/.rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160513-39119-13cpfzr.rb extconf.rb
Ignoring debase-0.2.2.beta7 because its extensions are not built.  Try: gem pristine debase --version 0.2.2.beta7

So I installed RVM and ran rvm install 1.9.3 then rvm use 1.9.3 and then the following ran without error:

gem install ruby-debug-base19x --pre
gem install ruby-debug-ide --pre

Then I go to Debug and I see this pop-up:

Debugger not installed Pop-up for RubyMine

If I select yes there is a status dialog that appears to be trying to install these:

.../ruby-debug-base19x-0.11.31.gem
.../ruby-debug-ide-0.6.1-beta2.gem

After which RubyMine displays this error:

Error running Vagrant Up: 
Cannot start debugger. Gem 'ruby-debug-ide' isn't installed or its executable script 'rdebug-ide' doesn't exist

Error Message after trying to install Debugger Gems on Rubymine

If I try to debug again it just runs me through the same popup-install-then-error loop.


BTW, here is my Run/Debug Configuration:

Run/Debug Configuration for Vagrant on RubyMine


P.S. The Vagrant .gemspec specifies >= 2.0.0 Ruby so I am worried that even if I can get it fixed RubyMine debugging won't work with, but hopefully not:

s.required_ruby_version = ">= 2.0.0"

Thanks in advance for any help. -Mike

Community
  • 1
  • 1
MikeSchinkel
  • 4,667
  • 4
  • 32
  • 41
  • One note: Ruby 2.3.0 has some significant bugs. Try version 2.3.1 instead if you can. – Michael Gaskill May 13 '16 at 08:19
  • RubyMine is probably using the system Ruby. With RVM, you can change to the system Ruby to install the gems, by running `rvm use system` and then installing the debug gems. When installing the gems, you may have to sudo to get around permissions issues, but try without first. – Michael Gaskill May 13 '16 at 08:34
  • @MichaelGaskill Thanks for the answer. Unfortunately after switching to system Ruby and attempting `sudo gem install ruby-debug-base19x --pre` I get _`"No source for ruby-2.0.0-p648 provided with debugger-ruby_core_source gem."`_ Trying to get RubyMine to do the installing I get _`"Bundler could not find compatible versions for gem "bundler":"`_ which I can resolve with a bundler version option before `install` but RubyMine does not let me add that. So, **still stuck. :-(** – MikeSchinkel May 13 '16 at 19:45
  • Check this out for some suggestions: [http://stackoverflow.com/questions/21998832/no-source-for-ruby-2-0-0-p451-provided-with-debugger-ruby-core-source-gem](http://stackoverflow.com/questions/21998832/no-source-for-ruby-2-0-0-p451-provided-with-debugger-ruby-core-source-gem) – Michael Gaskill May 13 '16 at 19:54
  • You might want to upgrade your system Ruby to use the debug gems. I believe that you can do it with RVM, as long as you're switched to the system Ruby. Check the system Ruby version with `ruby -v`, and use that version in the upgrade: `rvm upgrade 2.0.0 2.2.5` where 2.0.0 can be replaced with your system Ruby version and 2.2.5 is the version to upgrade it to. You might want to upgrade to new versions (e.g. 2.1.9, 2.2.5, 2.3.1) incrementally to make sure nothing breaks... – Michael Gaskill May 13 '16 at 19:54
  • @MichaelGaskill Thanks for your continued help. I tried all the things that answer suggested as well as upgrade to 2.2.5 but still errors -- Too many to list in a comment -- and `ruby --version` still shows `2.0.0`. Being new to Ruby, this all feels like a nightmare! Worse than Windows DLL hell. You would not happen to want to screen share with me and let me pay you for the help would you? – MikeSchinkel May 13 '16 at 21:06
  • I'm afraid that you'd be wasting time and money on that. I've already used up all of the suggestions that I might have on that. I stopped using RubyMine about 3 years ago, so I've just been dredging up memories that I thought might help. – Michael Gaskill May 13 '16 at 21:08
  • @MichaelGaskill I'd be willing to waste time and money on it if you would... but I understand if you don't have the time or are not interested. I believe that problems are that most of Ruby ecosystem is still greek to me and I can't recognize the symptoms right in front of me that would be plainly obvious to a Rubyist. BTW, what do you use for debugging Ruby? As I said in my post, I'm a long time PhpStorm user hence why I hoped to use RubyMine. – MikeSchinkel May 13 '16 at 21:33
  • I actually don't use a debugger at all. I like to keep a pretty minimalistic environment, because I switch machines constantly, and the config overhead for a complex environment annoys me. `puts` works fine for most of what I do, so I just stick with that. – Michael Gaskill May 13 '16 at 21:37
  • Gotcha. I can't work w/o a debugger. I think I just can't maintain enough complexity in my head like some developers. Kudos that you can. – MikeSchinkel May 13 '16 at 21:40

0 Answers0