Question

I'm new to Rails and need to get my Eclipse DLTK highlighting working.

It is occasionally giving syntax error, unexpected ':' for hash colon notation. Though the application runs fine.

I'm using Eclipse Indigo and the Ruby Development Tools.

Was it helpful?

Solution

So, unfortunately, this is still an issue in Eclipse, and it's driving me crazy.

Both the Eclipse DLTK project (for both Indigo and Juno) and the Aptana Studio plugin for Eclipse -- all have this issue. Here's the relevant bugs, still open and unaddressed:

1) https://bugs.eclipse.org/bugs/show_bug.cgi?id=386350

2) http://jira.appcelerator.org/browse/APSTUD-4405

It's enough to make me overcome the usual switching IDE inertia, so I'm currently evaluating RubyMine (it does not have that syntax error problem, as I just tested, and is an excellent Ruby IDE from everything I've been able to read).

[edit] For what it's worth, I also just submitted a patch for this issue on the dltk.ruby github repo.

OTHER TIPS

As of today, I like Idodds answer best: use DLTK 5.0 which appears to be the only option both (modestly) maintained and (modestly) functional. I had to crawl through some nasty internets to find the answer to "how to actually install DLTK 5.0" since all the search results send you to update sites which gives you DLTK 2.0 at best. I finally found this, which was the best I encountered for getting 5.0 on newer eclipse luna (newer than Kepler which Idodds detailed):

http://download.eclipse.org/technology/dltk/updates-dev/5.0/

When I used that update site (and de-selected "show in groups" since they've misconfigured this plugin). Then I just selected the two options I wanted: "Ruby Development Tools" and "Ruby Development Tools SDK" (which in turn required the core plugin). PLEASE NOTE: I also made very sure to confirm the "Version" looked something like "5.*" which it did in this site (and definitely did not in the others).

enter image description here

PostScript: the other two:

RDT: I've been using RDT for almost a year now with ~0 success. it does a modest job of syntax highlighting, but it does a comprehensive job of crash-and-burning on ruby 1.9 syntax. I wish internet/google would flag RDT as deprecated: a plugin which supports ruby 1.8 and prior really should not be listed in current "ruby" search results.

Aptana gets some very good press, and some very bad press. I should try it, since I need Rails not just ruby, but the bad press seems pretty comprehensive, so I've avoided it. I tried a few times and failed, but of course any non-java eclipse plugin will probably take a few days to make work.

This seems to be mostly resolved now. The main problem I encountered was with the new hash key syntax.

With Eclipse Kepler and DLTK 5.0 there are less errors. The syntax checker seems strict, but now works.

Using the Kepler release make sure you add the following as a Repository in "Install New Software":

http://download.eclipse.org/releases/kepler

Then install DLTK 5.0. The repositories that come bundled with Kepler don't seem to refer to the latest DLTK version which is why this issue looks like its not fixed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top