Search code examples
rubyrubygemsrubymine

RubyMine debug not working


I cannot get debug mode working in RubyMine. Below is what I did to install it all. This is followed by the error details and my setup Any advice please

A Download and Install Ruby

1.Download Ruby 2.2.6 - http://rubyinstaller.org/downloads/

2.Install Ruby 2.2.6 to C:\Ruby

B Download Ruby Dev kit

3.Return to http://rubyinstaller.org/downloads/

4.Under development click on "https://dl.bintray.com/oneclick/rubyinstaller/DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe"

5.Create Folder C:\Ruby\DevKit

6.Unzip "DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe" into C:\Ruby\DevKit

8.Go to folder C:\Ruby\DevKit , Now press Shift then right click "Open command window here"

9.Type "ruby dk.rb init" in command prompt and hit enter (c:\DevKit>ruby dk.rb init)

10.Type "ruby dk.rb install" in command prompt and hit enter (c:\DevKit>ruby dk.rb install)

C Install RubyGems

11.Open command prompt and type the following commands and hit enter every time c:\gem install bundler

Then navigate to your project folder where the Gemfile located and run command 'bundle install'

D Download and Install Ruby Mine

13.Open http://www.jetbrains.com/ruby/download/

14.Click on 30 days Trial "Download Now"

15.Now Install Ruby Mine

From this point I can load projects and run projects but when I try to debug the same project I get issues.

The message is Test framework quit unexpectedly

C:\Ruby\bin\ruby.exe -EUTF-8 -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:/Ruby/lib/ruby/gems/2.2.0/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide --disable-int-handler --evaluation-timeout 10 --rubymine-protocol-extensions --port 62718 --host 0.0.0.0 --dispatcher-port 62719 -- C:\Ruby\bin/cucumber C:/git/wiggle-automation/features/checkout.feature --format Teamcity::Cucumber::Formatter --expand --color -r features
Testing started at 15:58 ...
C:/Ruby/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- debase_internals (LoadError)
    from C:/Ruby/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Ruby/lib/ruby/gems/2.2.0/gems/debase-0.2.2.beta10/lib/debase.rb:4:in `<top (required)>'
    from C:/Ruby/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Ruby/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Ruby/lib/ruby/gems/2.2.0/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:8:in `<top (required)>'
    from C:/Ruby/lib/ruby/gems/2.2.0/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide:8:in `require_relative'
    from C:/Ruby/lib/ruby/gems/2.2.0/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide:8:in `<top (required)>'
    from -e:1:in `load'
    from -e:1:in `<main>'

Process finished with exit code 1

So with this in mind I try to install debase – gem install debase And I get this

Building native extensions.  This could take a while...
The system cannot find the path specified.
ERROR:  Error installing debase:
        ERROR: Failed to build gem native extension.
C:/Ruby/bin/ruby.exe -r ./siteconf20170726-16784-15t9wif.rb extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
checking for vm_core.h... yes
creating Makefile
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby/lib/ruby/gems/2.2.0/gems/debase-0.2.1 for inspection.
Results logged to C:/Ruby/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/debase-0.2.1/gem_make.out

So I look at the gem_make.out file as above and I see this

C:/Ruby/bin/ruby.exe -r ./siteconf20170726-21048-1y9auxw.rb extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
checking for vm_core.h... yes
creating Makefile
extconf failed, exit code 1

Can anyone explain what is happening please.

I am using Windows 7 and Ruby 2.2.6p396


Solution

  • OK got this working now. I opened the Command Prompt as Administrator and then executed the following c:\gem install ruby-debug-ide c:\gem install debase

    This time they both executed with no error. I then restarted RubyMine and now I can run in debug mode. Happy days....