Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 345976

Summary: Debugger is looking for ruby-debug gem when it should look for ruby-debug19
Product: [Technology] DLTK Reporter: Adalbert Homa <adalbert.homa>
Component: RubyAssignee: dltk.ruby-inbox <dltk.ruby-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: alex.panchenko, fabricio.guzman, joachim.herb, larry, mike, nbaccount, pushkarapte, trishume, wafflesouffle, wayne.beaton, xpertsolutions
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
Fixes the fast debugger so that it should work on all Ruby versions, install locations and gems.
none
mylyn/context/zip none

Description Adalbert Homa CLA 2011-05-16 12:16:22 EDT
Build Identifier: I20110514-0800

Ruby 1.9 changes the gem used for debugging, instead of ruby-debug it should look for ruby-debug19

Reproducible: Always

Steps to Reproduce:
1.Install ruby-1.9.2
2.Try to debug any file
3.
Comment 1 Adalbert Homa CLA 2011-05-18 10:50:06 EDT
Here is some additional information.
The code is looking for gem that start with ruby-debug. This would pick it up, but the directory that is searching for is hard coded for ruby 1.8. For Ruby 1.9 the gems are now in a different directories.

Even after I changed the code to fix this, it still does not work because there is ruby code embedded in the plugins, that is specific for ruby 1.8. Ruby 1.9 changed syntax so they do not work.

Is there any intention to support Ruby 1.9?

Thanks
Comment 2 Larry Gilbert CLA 2012-07-31 13:37:37 EDT
Pinging, due to this being over a year old and still a valid bug in Juno and DLTK 4.0.0.201206120848.
Comment 3 Larry Gilbert CLA 2012-07-31 13:38:34 EDT
(In reply to comment #2)

P.S. This is not on Windows Vista, however, but Windows 7 (64-bit).
Comment 4 Tristan Hume CLA 2012-10-24 13:24:41 EDT
DLTK should also support the "debugger" gem for Ruby 1.9.2 and 1.9.3 found at https://github.com/cldwalker/debugger. It is better maintained and works for all 1.9.x versions.

Because of the massive improvements made in Ruby 1.9 and how long it has been out many/most Ruby developers have upgraded. I think that DLTK should definitely try to support 1.9.

I am interested in working on this bug and maybe contributing a fix. I'm interested in working on any bug that relates to compatibility with Ruby 1.9.
Comment 5 Tristan Hume CLA 2012-10-30 14:57:09 EDT
This will be a tough bug to fix. DLTK is a mess of 1.8 based and OS specific path assumptions and Ruby code that works in Ruby 1.8.

I tried to get it to accept the debugger gem but before I could do that I have to rewrite the gem list code which currently relies on OS-specific hard-coded gem paths that don't work for rvm, windows or non-standard installation locations.
Comment 6 Tristan Hume CLA 2012-11-05 14:15:04 EST
Created attachment 223193 [details]
Fixes the fast debugger so that it should work on all Ruby versions, install locations and gems.

Here is a patch for this bug. I fixed a bunch of bugs in the fast debugger ruby code so that it now works on 1.8 and 1.9.

I also replaced the code that checks for the debugger gem with a version that is robust to different install locations, distributions and gem names.
Comment 7 Tristan Hume CLA 2012-11-05 14:15:19 EST
Created attachment 223194 [details]
mylyn/context/zip
Comment 8 Mike Morearty CLA 2013-01-14 22:33:56 EST
Is a committer going to check in Tristan's patch?  He submitted it two months ago.
Comment 9 Alex Panchenko CLA 2013-01-16 02:56:19 EST
Yes, later this month.
Comment 10 Alex Panchenko CLA 2013-01-24 15:58:59 EST
*** Bug 318107 has been marked as a duplicate of this bug. ***
Comment 11 Joachim Herb CLA 2013-02-01 12:31:14 EST
Sorry to be inpatient, but the month is over. I would build my own (local) version of dltk.ruby if I knew how. Could somebody please point me to a document describing how to do it. Thank you very much.
Comment 12 Mike Morearty CLA 2013-02-01 13:16:38 EST
I checked this patch into my fork of the dltk.ruby project, which is here:

    https://github.com/mmorearty/dltk.ruby

The way I have been running it, which is a bit silly but works for me for the short term, is:

* Run regular Eclipse, which already has the "regular" dltk.ruby installed; but point it at a different workspace, e.g. "my-dltk-workspace"
* Import all the projects from my dltk.ruby fork into the workspace
* From Eclipse, run a child instance of Eclipse.  Do this via "Run > Run Configurations", then click "Eclipse Application", then click the "+" icon.  If desired, modify it to point to your regular workspace.

I'm not quite sure how to offer easy instructions to build a binary set of plugins that you can drop into your regular Eclipse instance.
Comment 13 Mike Morearty CLA 2013-02-01 13:37:53 EST
Thinking about it some more, I think there were a couple more steps:

* I think I had to install some Maven-Eclipse plugin. 
* I also had to import all plugins from the main DLTK git repo. I don't have the name or URL handy at the moment.
Comment 14 Alex Panchenko CLA 2013-02-01 15:27:25 EST
Hi guys,

Sorry for the delay. I applied the patch.

However I was not able to try the debugger with ruby 1.9, as for me ruby-debug doesn't install into 1.9, but if I install ruby-debug19 then it can't be used by the debugger integration.

What is the recommended way to run it on Ubuntu?

Regards,
Alex
Comment 15 Mike Morearty CLA 2013-02-02 20:52:00 EST
Hi Alex,

I haven't done it on Ubuntu (only OS X), but Tristan's patch mentions the "debugger" gem.  Also, http://stackoverflow.com/questions/8087610/ruby-debug-with-ruby-1-9-3 indicates that the "debugger" gem is a replacement for ruby-debug19.  I can't quite call how I got it all work.  Give the debugger gem a try.
Comment 16 Joachim Herb CLA 2013-02-03 15:36:44 EST
Thank you for your hints how to "compile" it. I cloned the latest "master" branch repositories of dltk core and dltk ruby at github. Then I tried to created the plugin using the export wizard via File → Export → Plug-in Development → Deployable plug-ins and fragments as described here: http://www.vogella.com/articles/EclipsePlugIn/article.html#deployplugin_export

I had to install various other plugins to get it to work. Finally I could export one zip file containing all plugins of dltk core and dltk ruby. This file could be installed on the same and another computer inside the dropins folder as described here:
http://help.eclipse.org/juno/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/p2_dropins_format.html
(Actually one eclipse was indigo, and one juno). 

(The installed plugins do not appear in the "Installed Software" tab but only in "Plug-ins" tab (in the installation details), which confused me at the beginning).

This is the list of all software installed from the list in the help menu. I am not sure, which is really necessary to create the plugins:
  AnyEditTools	2.4.3.201211022220	AnyEditTools.feature.group	Andrey Loskutov
  C/C++ Development Tools	8.1.1.201209170703	org.eclipse.cdt.feature.group	Eclipse CDT
    C/C++ Development Platform	8.1.1.201209170703	org.eclipse.cdt.platform.feature.group	Eclipse CDT
    C/C++ DSF GDB Debugger Integration	4.0.1.201209170703	org.eclipse.cdt.gnu.dsf.feature.group	Eclipse CDT
    C/C++ GNU Toolchain Build Support	8.1.1.201209170703	org.eclipse.cdt.gnu.build.feature.group	Eclipse CDT
    C/C++ GNU Toolchain Debug Support	7.1.1.201209170703	org.eclipse.cdt.gnu.debug.feature.group	Eclipse CDT
    CDT Common GDB Support	7.0.0.201209170703	org.eclipse.cdt.gdb.feature.group	Eclipse CDT
  Eclipse EGit	2.2.0.201212191850-r	org.eclipse.egit.feature.group	Eclipse EGit
    Eclipse JGit	2.2.0.201212191850-r	org.eclipse.jgit.feature.group	Eclipse JGit
      Eclipse JGit 3rd Party Dependencies	2.2.0.201212191850-r	org.eclipse.jgit.orbit.feature.group	Eclipse JGit
  Eclipse for Testers	1.5.1.20121004-1506	epp.package.testing	null
    Eclipse Platform	4.2.1.M20120914-1800	org.eclipse.platform.ide	null
      Eclipse Platform	4.2.1.v20120814-120134-9JF7BHVGFyMveli1uX6aTH0q-eAap6PAgOP5mO	org.eclipse.platform.feature.group	Eclipse.org
        Eclipse Help System	1.4.1.v20120726-051048-8R7xFOUFLWUl7MoSKV_RBXl27	org.eclipse.help.feature.group	Eclipse.org
        Eclipse RCP	4.2.1.v20120814-120134-7IAPA8BrHQicS-rjP0GbqK780kMy	org.eclipse.rcp.feature.group	Eclipse.org
          Eclipse e4 Rich Client Platform	1.1.0.v20120521-2329-8yFTIGIbGGduEZ6-7-jLx41nXj	org.eclipse.e4.rcp.feature.group	Eclipse.org
            EMF - Eclipse Modeling Framework Core Runtime	2.8.1.v20120911-0500	org.eclipse.emf.ecore.feature.group	Eclipse Modeling Project
            EMF Common	2.8.0.v20120911-0500	org.eclipse.emf.common.feature.group	Eclipse Modeling Project
        Equinox p2 Provisioning for IDEs.	2.2.0.v20120524-0542-62DG9JXTlSiz-UbcP0w0KGl9CKNP	org.eclipse.equinox.p2.user.ui.feature.group	Eclipse.org - Equinox
          Add-on Function for p2	1.1.0.v20120524-0542-7A6FEcDiVOTg1Q_HuZrEuBty3dqr	org.eclipse.equinox.p2.extras.feature.feature.group	Eclipse.org - Equinox
            Equinox p2 Core Function	1.1.0.v20120524-0542-8297FncFWmE7h4Asx2cpqz-T38	org.eclipse.equinox.p2.core.feature.feature.group	Eclipse.org - Equinox
          Equinox p2 RCP Management Facilities	1.1.0.v20120524-0542-785EoBqNKNYz-GX2sUgCaBty3dqr	org.eclipse.equinox.p2.rcp.feature.feature.group	Eclipse.org - Equinox
    EPP Testing Feature	1.5.1.20121004-1506	org.eclipse.epp.package.testing.feature.feature.group	Eclipse Packaging Project
      Eclipse CVS Client	1.3.200.v20120525-1249-7B79FJJAkF7BF7VEH5IAJT	org.eclipse.cvs.feature.group	Eclipse.org
      EclipseLink JPA	2.4.0.v20120608-r11652	org.eclipse.persistence.jpa.feature.group	Eclipse.org - EclipseLink Project
      EPP Common Package Feature	1.5.1.20121004-1506	org.eclipse.epp.package.common.feature.feature.group	Eclipse Packaging Project
        Marketplace Client	1.1.1.I20110907-0947	org.eclipse.epp.mpc.feature.group	Eclipse Packaging Project
          Equinox p2 Discovery	1.0.100.v20120524-0542-4-Bh9oB58A5N9L28PCQ	org.eclipse.equinox.p2.discovery.feature.feature.group	Eclipse.org - Equinox
      Jubula	1.2.2.201209040912	org.eclipse.jubula.feature.feature.group	Eclipse Jubula
      Mylyn Context Connector: Eclipse IDE	3.8.2.v20120916-1200	org.eclipse.mylyn.ide_feature.feature.group	Eclipse Mylyn
        Mylyn Context Connector: Team Support	3.8.2.v20120916-1200	org.eclipse.mylyn.team_feature.feature.group	Eclipse Mylyn
          Mylyn Task-Focused Interface	3.8.2.v20120916-1200	org.eclipse.mylyn.context_feature.feature.group	Eclipse Mylyn
            Mylyn Task List	3.8.2.v20120916-1200	org.eclipse.mylyn_feature.feature.group	Eclipse Mylyn
              Mylyn Commons	3.8.2.v20120916-1200	org.eclipse.mylyn.commons.feature.group	Eclipse Mylyn
              Mylyn Commons Connector: Discovery	3.8.2.v20120916-1200	org.eclipse.mylyn.discovery.feature.group	Eclipse Mylyn
              Mylyn Commons Connector: Monitor	3.8.2.v20120916-1200	org.eclipse.mylyn.monitor.feature.group	Eclipse Mylyn
              Mylyn Commons Identity	1.0.2.v20120916-1200	org.eclipse.mylyn.commons.identity.feature.group	Eclipse Mylyn
              Mylyn Commons Notifications	1.0.2.v20120916-1200	org.eclipse.mylyn.commons.notifications.feature.group	Eclipse Mylyn
              Mylyn Commons Repositories	1.0.2.v20120916-1200	org.eclipse.mylyn.commons.repositories.feature.group	Eclipse Mylyn
        Mylyn Tasks Connector: Eclipse IDE	3.8.2.v20120916-1200	org.eclipse.mylyn.tasks.ide.feature.group	Eclipse Mylyn
      Mylyn Tasks Connector: Bugzilla	3.8.2.v20120916-1200	org.eclipse.mylyn.bugzilla_feature.feature.group	Eclipse Mylyn
      Mylyn WikiText	1.7.2.v20120916-1200	org.eclipse.mylyn.wikitext_feature.feature.group	Eclipse Mylyn
  Eclipse Java Development Tools	3.8.1.v20120814-104540-8-8nFqpFNOfwKDRVz-tXOcL5d_83	org.eclipse.jdt.feature.group	Eclipse.org
  Eclipse Plug-in Development Environment	3.8.1.v20120814-104528-7c7vFixFFt6Zr5aC6KM6LGWSd	org.eclipse.pde.feature.group	Eclipse.org
  Eclipse Test Framework	3.5.100.v20120528-1714-7R7dBhBgLiCViQnG8ISKO73701A1	org.eclipse.test.feature.group	Eclipse.org
  Eclipse XML Editors and Tools	3.4.1.v201208170345-7H7GFeFDxumUpsw5rgjWnKDrsz0p4ymwjQz00T2S	org.eclipse.wst.xml_ui.feature.feature.group	Eclipse Web Tools Platform
    WST Common UI	3.4.1.v201208170300-7C7AFeEEdhOaweJhCnQfykJvPz-S1RT	org.eclipse.wst.common_ui.feature.feature.group	Eclipse Web Tools Platform
      WST Common Core	3.4.1.v201208162200-7B7EFMTF7RZHOjIuOyR0QS	org.eclipse.wst.common_core.feature.feature.group	Eclipse Web Tools Platform
    WST XML Core	3.4.1.v201208170345-7C7OFm5F7RZHQRIsOz-Nz-_n	org.eclipse.wst.xml_core.feature.feature.group	Eclipse Web Tools Platform
    WST XML User Documentation	3.3.0.v201102071641-50FYwAkF7B77UBZFDBL	org.eclipse.wst.xml_userdoc.feature.feature.group	Eclipse Web Tools Platform
  EPIC	0.5.46	org.epic.feature.main.feature.group	Epic Project
  JavaScript Development Tools	1.4.1.v201208171701-7H7DFg0FC7sReqSyfqesWi	org.eclipse.wst.jsdt.feature.feature.group	Eclipse Web Tools Platform
  MercurialEclipse	2.0.1.201211031332	mercurialeclipse.feature.group	MercurialEclipse project
  Object Teams Patch for JDT/Core	2.1.1.201209011847	org.eclipse.objectteams.otdt.core.patch.feature.group	Eclipse.org - Object Teams
  pluginName	5.0.0.201302030129	org.eclipse.dltk.core.tools.ui	providerName
  RSE Core	3.4.1.201209191030-7a7NFm27sResTNgNeS4R	org.eclipse.rse.core.feature.group	Eclipse TM Project
  RSE SSH Services	3.0.400.201209191030-7A4FEc7F7BF7gBgB7J7	org.eclipse.rse.ssh.feature.group	Eclipse TM Project
  SWT Designer	1.5.1.r42x201209161238	org.eclipse.wb.rcp.feature.feature.group	Eclipse.org
    SWT Designer Core	1.5.1.r42x201209161211	org.eclipse.wb.swt.feature.feature.group	Eclipse.org
      WindowBuilder Core	1.5.1.r42x201209161109	org.eclipse.wb.core.feature.feature.group	Eclipse.org
    WindowBuilder Core UI	1.5.1.r42x201209161116	org.eclipse.wb.core.ui.feature.feature.group	Eclipse.org
    WindowBuilder GroupLayout Support	1.5.1.r42x201209161140	org.eclipse.wb.layout.group.feature.feature.group	Eclipse.org
  SWT Designer SWT_AWT Support	1.5.1.r42x201209161301	org.eclipse.wb.rcp.SWT_AWT_support.feature.group	Eclipse.org
    Swing Designer	1.5.1.r42x201209161216	org.eclipse.wb.swing.feature.feature.group	Eclipse.org
  SWTBot for Eclipse Testing (incubation)	2.0.5.20111003_1754-3676ac8-dev-e36	org.eclipse.swtbot.eclipse.feature.group	Eclipse.org
    SWTBot for Eclipse Forms Testing (incubation)	2.0.5.20111003_1754-3676ac8-dev-e36	org.eclipse.swtbot.forms.feature.group	Eclipse.org
      SWTBot for SWT Testing (incubation)	2.0.5.20111003_1754-3676ac8-dev-e36	org.eclipse.swtbot.feature.group	Eclipse.org
  SWTBot IDE Features (incubation)	2.0.5.20111003_1754-3676ac8-dev-e36	org.eclipse.swtbot.ide.feature.group	Eclipse.org
  TPTP Test Framework	4.5.101.v201101261720-7L7N8_BgJ9DJ9VHNHPNV	org.eclipse.tptp.test.feature.group	Eclipse - TPTP
  TPTP Test Framework and Tools SDK	4.5.101.v201101261720-7T7WABAK3QKD0ce8D87PHMnSvImn	org.eclipse.tptp.test.sdk.feature.group	Eclipse - TPTP
    TPTP Test Framework and Tools Samples	4.4.0.v201005032111-53-7w312116323449	org.eclipse.tptp.test.samples.feature.group	Eclipse - TPTP
    TPTP Test Framework and Tools Samples Source	4.4.0.v201005032111-53-7w312116323449	org.eclipse.tptp.test.samples.source.feature.group	Eclipse - TPTP
    TPTP Test Framework Source	4.5.101.v201101261720-7L7N8_BgJ9DJ9VHNHPNV	org.eclipse.tptp.test.source.feature.group	Eclipse - TPTP
    TPTP Test Tools	4.5.1.v201101261720-7L7U1A5eNmJSvZVScRkPPMVWa	org.eclipse.tptp.test.tools.feature.group	Eclipse - TPTP
      TPTP JUnit Plug-in Test Tools	4.7.1.v201101261720-7H7P1AkF7B97JFHCJKF	org.eclipse.tptp.test.tools.junit.feature.group	Eclipse - TPTP
      TPTP URL Recorder	4.7.0.v201005032111-797D-8s73533D75799J	org.eclipse.tptp.test.recorders.url.feature.group	Eclipse - TPTP
    TPTP Test Tools ISV Documentation	4.5.0.v201005032111-54-7w312116362211	org.eclipse.tptp.test.doc.isv.feature.group	Eclipse - TPTP
    TPTP Test Tools Source	4.5.1.v201101261720-7L7U1A5eNmJSvZVScRkPPMVWa	org.eclipse.tptp.test.tools.source.feature.group	Eclipse - TPTP
Comment 17 Joachim Herb CLA 2013-02-03 15:37:42 EST
Sorry, I forgot to mention:
It now works with Ruby 1.9.3 on Windows 7 (64bit) with the debugger gem (as described above).
Comment 18 Fabricio Guzman CLA 2013-03-15 06:44:29 EDT
I was able to use Herb's instructions to get the debugger gem working on Juno (XP, 32-bit, ruby 193) with one minor hiccup... I'm unable to set a break point anywhere in the script. Under Menu->Run the "Toggle Breakpoint" option is disabled.  Any hints would be greatly appreciated.  The toggle feature was working before with dltk 2 and ruby 187.
Comment 19 Joachim Herb CLA 2013-03-27 20:28:21 EDT
I don't see this problem. I think what help me with a similar problem was to go to the breakpoints Windows->Show View->Breakpoints and delete all.

(In reply to comment #18)
> I was able to use Herb's instructions to get the debugger gem working on
> Juno (XP, 32-bit, ruby 193) with one minor hiccup... I'm unable to set a
> break point anywhere in the script. Under Menu->Run the "Toggle Breakpoint"
> option is disabled.  Any hints would be greatly appreciated.  The toggle
> feature was working before with dltk 2 and ruby 187.
Comment 20 Joachim Herb CLA 2013-03-27 20:46:09 EDT
By the way: this now also works with ruby 2.0.0 and debugger 1.5.0
Comment 21 Pushkar Apte CLA 2013-06-04 11:23:20 EDT
Hi Joachim/Alex,

I'm new to Eclipse so could you help me out with the steps to install the updated plugin after I clone the dltk core and dltk ruby code from git?

Thanks
Comment 22 Joachim Herb CLA 2013-06-04 16:47:51 EDT
If you have one month time: There should be a new release of DLTK this month (June 2013, http://www.eclipse.org/dltk/) which will include this patch. Otherwise see comment #16 for instructions how to compile/install it. I am afraid it is such complicated :-( 

(I googled for a beta build of DLTK but didn't find one. Does anybody know, if there is already one/one is planned soon?)

(In reply to comment #21)
> Hi Joachim/Alex,
> 
> I'm new to Eclipse so could you help me out with the steps to install the
> updated plugin after I clone the dltk core and dltk ruby code from git?
> 
> Thanks
Comment 23 Pushkar Apte CLA 2013-06-04 23:51:08 EDT
Thanks Joachim for the quick response. I think I'll wait a bit for the new DLTK release or test out the beta if available earlier.
Comment 24 Joachim Herb CLA 2013-06-23 07:44:26 EDT
(In reply to comment #23)
> Thanks Joachim for the quick response. I think I'll wait a bit for the new
> DLTK release or test out the beta if available earlier.

There should be integration builds for the upcoming release, but the page is broken:
http://www.eclipse.org/forums/index.php/m/1065014/

But as a work around here are the nightly test builds:
https://hudson.eclipse.org/hudson/job/dltk-nightly/
e.g. use this update site in Eclipse: https://hudson.eclipse.org/hudson/job/dltk-nightly/555/artifact/org.eclipse.dltk.releng/build/update.site/target/site/ and install Ruby DLTK as usual.
Comment 25 Joachim Herb CLA 2013-06-28 12:35:03 EDT
Finally there is an official release:
http://download.eclipse.org/technology/dltk/downloads/drops/R5.0/R-5.0-201306060709/

I tried the following combinations:
Eclipse Juno Service Release 2 (64bit), DLTK Ruby 5.0.0.201306060709, Ruby 1.9.3p392 32bit, Windows 7 64bit, debugger 1.6.0: Works
Eclipse Juno Service Release 2 (64bit), DLTK Ruby 5.0.0.201306060709, Ruby 2.0.0p0   32bit, Windows 7 64bit, debugger 1.6.0: Works
Eclipse Juno Service Release 2 (64bit), DLTK Ruby 5.0.0.201306060709, Ruby 2.0.0p195 64bit, Windows 7 64bit, debugger 1.6.0: Works

Eclipse Kepler (64bit), DLTK Ruby 5.0.0.201306060709, Ruby 1.9.3p392 32bit, Windows 7 64bit, debugger 1.6.0: Works
Eclipse Kepler (64bit), DLTK Ruby 5.0.0.201306060709, Ruby 2.0.0p0   32bit, Windows 7 64bit, debugger 1.6.0: Works
Eclipse Kepler (64bit), DLTK Ruby 5.0.0.201306060709, Ruby 2.0.0p195 64bit, Windows 7 64bit, debugger 1.6.0: Works

(debugger means debugger gem)

So I guess, this bug can be set to resolved/fixed :-)
Comment 26 Alex Panchenko CLA 2013-06-28 22:51:32 EDT
Thanks!
Resolving.