Dangthrimble
Dangthrimble

Reputation: 41

How can I get debug support in Aptana 3 with Ruby 1.9.3?

I am running with the following configuration:

I am unable to install ruby-debug (even after checking COMSPEC and AutoRun as specified in https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting#wiki-gems_fails_comspec_autorun to address "ERROR: Failed to build gem native extension") but was then pointed at http://rubygems.org/gems/debugger, which installed successfully.

Unfortunately Aptana still expects ruby-debug!

Can someone advise how I can get this sorted?

Thanks.


OK, so I was directed to linecache19-0.5.13-4-20-6.gem and ruby-debug-base19-0.11.26-4-20-6.gem. Downloaded both and installed linecache successfully from the directory holding the downoaded gem but wasn't successful with ruby-debug-base. Then found details that suggested:

> gem install ruby-debug-base19-0.11.26-4-20-6.gem -- --with-ruby-include=C:\Ruby193\include\ruby-1.9.1\ruby-1.9.3-p125

I have to confess I know so little about gem that I don't know why that worked, or what the empty "--" was supposed to accomplish, but work it did:

Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Successfully installed ruby-debug-base19-0.11.26
1 gem installed
Installing ri documentation for ruby-debug-base19-0.11.26...
Installing RDoc documentation for ruby-debug-base19-0.11.26...

Aptana still complained about the absence of ruby-debug-ide, so:

> gem install ruby-debug-ide19
Fetching: ruby-debug-ide19-0.4.12.gem (100%)
Successfully installed ruby-debug-ide19-0.4.12
1 gem installed
Installing ri documentation for ruby-debug-ide19-0.4.12...
Installing RDoc documentation for ruby-debug-ide19-0.4.12...

Hoorah! Except...

Aptana now fails with:

An internal error occurred during: "Launching YANG.rb".
Could not connect to debugger on port 3818

So I then tried:

>gem install ruby-debug19
Fetching: ruby-debug19-0.11.6.gem (100%)
Successfully installed ruby-debug19-0.11.6
1 gem installed
Installing ri documentation for ruby-debug19-0.11.6...
Installing RDoc documentation for ruby-debug19-0.11.6...

The only difference is the reported port number changes each time I try to debug. I've run

>netstat -a

and each time the new port isn't listed until after debug is run, e.g.

Proto  Local Address          Foreign Address        State
TCP    THE-BEAST:3818         THE-BEAST:0            LISTENING

Any ideas?

Thanks

Upvotes: 4

Views: 3894

Answers (1)

Stéphane Gerber
Stéphane Gerber

Reputation: 1508

I have downloaded and run once the debug mode of rubymine(4.0.3).

When you activated the debug mode ruby-debug-ide is correctly installed. I had to cancel once a hung process and start the debug mode one more time.

So now everything is working with Aptana.

(I installed rails with http://railsinstaller.org and I use Windows 7 (64bit), but I don't think it's relevant).

According to RubyMine's log, here are the gems installed: (I guess the order is important, but I am not sure).

  • Installed gem: ruby-debug-ide-0.4.17.beta9.gem
  • Installed gem: ruby-debug-base19x-0.11.30.pre10.gem
  • Installed gem: linecache19-0.5.13.gem

I rechecked without RubyMine and the following commands worked:

gem install ruby-debug-ide --pre

gem install ruby-debug-base19x --pre

Upvotes: 5

Related Questions