Using the Ruby Dev-Tools plug-in for Eclipse
An anonymous reader writes "IBM Developerworks is running an article that introduces using the Ruby Development Tools (RDT) plug-in for Eclipse, which allows Eclipse to become a first-rate Ruby development environment. Ruby developers who want to learn how to use the rich infrastructure of the Eclipse community to support their language will benefit, as will Java developers who are interested in using Ruby."
Really.
I think there is a plug in that should scratch just about any itch. Nice.
It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
Making use of this and the Eclipse RCP, the RadRails is also making a big contribution to the community.
My employer (a major high-tech corporation) has recently been encouraging the use of this plug-in for Eclipse. From what I can see, RDTs will take off in the near future!
LINUX ONLINE POKER: Linux Poker
Uses RDT plus others, and a nice, clean install.
... because Ruby is a dynamic language it is more difficult for IDEs to autocomplete, etc.
I do most of my development in Java, so I mostly use IntelliJ (best Java IDE, IMHO). However, I also really like Eclipse because in one IDE you can code in Java, C++, Ruby, Python, etc.
And Eclipse? simply the best development IDE available IMHO...... And all of that in only a few thousand lines of code.....
I've been using Eclipse with the RDT + Sublipse + RadRails plugins for a week or two on Windows. Its really quite nice. I didn't see an easy way to convert an existing Rails project into one that loads up nicely in the UI. I ended up creating a test project in Eclipse, taking that projects .project file and modifying it, then sticking it over in my existing project's directory. Load the .project file and voila, the IDE shows all the directors (M, V, C, etc). Very nice, and no surprise that .2 doesn't have a migration yet.
I've been trying to live more in more in the other half of my dual-boot machine, especially now with Ubuntu's Breezy Badger release that has solved some of my issues such as notebook suspend. *Anyway*, when trying to install the RDT plugin, I am getting error messages. It all just worked in Windows and I was hoping for the same experience for Ubuntu.
...a Ruby plugin, that is; this one done by Rob McKinnon. It's a good piece of work, although of course all the "code completion is hard for dynamic languages" applies here as well.
For what it's worth, enscript works fine for doing Ruby syntax highlighting if that's all you need.
The Army reading list
Here I was, happily writing stuff with XEmacs, but somehow, there was something missing from my coding stuff and things started to feel a bit wooden.
Weirdly enough, when I grabbed RDT, things started to look surprisingly bright and writing code was not that boring anymore. There are some emacsisms that I miss, but otherwise, this thing is really great. Eclipse was clearly made for bigger projects and it worked just fine when I got the crazy tendency to split my code across zillion little files! Wish XEmacs had this good file browser...
(And the silly little Ruby project I've worked on lately was Miller's Quest.)
Is it me, or does Ruby seem to be the Amiga of programming languages? It's cool. It's powerful. And no one cares. Oh and it's bound to be just as successful.
"You'll get nothing, and you'll like it!"
The Ruby Eclipse plugin is the best debugger I know of. It's been indespensble. The time you spend setting it up will pay off big.
Wansu, th' chinese sailor
Pfffttt! Eclipse is lame. I use jEdit. I have used Eclipse quite a bit, but it is just way too fat IMHO. jEdit can work for just about any language (including Ruby) and it is just a lot leaner. Try it! You'll like it!
blah blah blah
that must really roast their beans. har har...
Just raise the taxes on crack.
One cool features in Ecipse's native mode is when you click on a variable it highlights every other instance of that variable within your current source. I haven't seen any other IDE's do this and the PHPEclipse plugin doesn't do it either. Does this plugin for Ruby-on-rails support it?
The man who trades freedom for security does not deserve nor will he ever receive either. - Benjamin Franklin
Why use Eclipse? Why indeed. How about:
- best of breed Java development tools, including full refactoring support and full debugger
- team integration (comes with CVS support, other stuff can be added with plugins)
- awesome browsing support
- automatic incremental builds take place in the background. NEVER PRESS THE COMPILE BUTTON AGAIN. Just type some code, hit Save, and see the compile errors appear in the margin immediately. Since there's no need to stop and compile, you can Debug or Run your application at any time. (of course you can turn off auto builds if you prefer to build manually)
- RCP makes a good target platform for GUI apps. Use native widgets in your Java code. Develop Eclipse plugins in Eclipse.
- Useful frameworks like GEF (Graphical Editor Framework) and EMF (Eclipse Modeling Framework) can accelerate your development cycle.
I've been using Eclipse for Java development for about 3 years and I can't imagine writing Java code without it. Who wants to perform refactorings by hand, or debug with some crappy command-line debugger? Whether you're writing little hack utilities in Java or giant GUI apps, JDT just can't be beat.
A pretty neat Ruby code editor on OS X is TextMate. Some powerful stuff in there if you lie somewhere between the vi/emacs camp and the notepad/bbedit camp...
Did you install a Sun version of Java? I have Breezy installed and it had gcj aliased as "java". When I tried to install Eclipse I got all kinds of errors. After realizing the problem and installing Java 1.5_05 it works flawlessly. Just make sure the real java is in the PATH before gcj.
"It ain't a war against drugs.it's a war against personal freedom" --Bill Hicks
Also, it kept on giving me lists of errors I could not understand.
I went back to scite and jEdit. I'm thinking of going back to emacs, actually.
I18N == Intergalacticization
Have you actually tried Ruby? I mean, gave it an honest to goodness chance.. say a dozen or so hours of coding and perhaps the first few chapters of a good reference book? I just find it really hard to believe than anyone who actually knew Ruby's syntax would call it disqusting. It is, by a fairly wide margin, the nicest language I've ever used. Everything is incredibly easy and intuitive. If I don't know how to do something, I can usually guess it on my first or second try, and it makes it so easy to write reusable, modular code that it's stupid not to, even for what appears to be a throwaway program.
Ruby is hugely productive. Pretty much everything I've ever wanted to do requires less code, less configuration, and simply less hassle than in every other language I've used.
Now, this is mostly evident when compairing to more traditional statically typed languages like Java and C#, but Ruby's has plenty to offer folks who already use agile languages like Python or Lisp. Ruby has an easy to use and powerful package managment system, Gems. An excellent build tool, Rake. RDoc, a powerful JavaDoc like documentation system. Rails, which is probably the most productive web devleopment platform on the planet. Watir, a web scripting system that makes functional and system testing a breeze. MouseHole, a really slick scriptable proxy. Two extremely well written, freely available books: the first edition of Programming Ruby, and Why's Poignant Guide. An extremely helpful user community. The list goes on and on.
Maybe you should be asking yourself why you dislike Ruby so much, rather than why everyone else likes it. That's not to say that everyone should like it as much as I do, but I suspect you're missing something important.
I have made it something of a crusade to try out as many languages as possible and not pre-judge their usefulness and capabilities. I have recently been using Ruby very successfully for some small scripting projects. I've found in the process that, although there are some things about it that drive me crazy, for this kind of task (file filters, modeling some data structures with a test script built using RubyUnit, etc.) I like it far more than Perl or Python. As far as I'm concerned, it is the logical successor to Perl. This doesn't mean I think there is no room for improvement in scripting languages, but just that Ruby's advantages already make it so I never want to look at a Perl script again.
What I like about it:
- Being able to leave off unused parentheses and chain together method calls like a_string.chomp.each... allows putting together complex file filters really, really quickly!
- Nice use of iterators in just about every place it makes sense
- Flexible post-statement "if" and "unless"
- Faster than one might expect for a fully interpreted language
- Reasonably good display of syntax errors (better than some)
- Far more consistent syntax than Perl, but makes easy a lot of the same things that Perl makes easy
- Excellent regexp support
- Extensive library
- (Most of the time) "it just works" -- an awful lot of my code ran perfectly on the first try, even though I was a Ruby Nuby.
- "More than one way to do it"
- "Everything is an object"
- Duck typing
- Support for continuations
What I dislike about it:
- Gratuitous spelling of "elsif" (When switching languages a lot, it is really frustrating to have to constantly remember whether I need to use "else if," "elsif," or "elif"
- Syntax doesn't seem to lend itself well to a formal grammar; too much context-sensitivity in parsing
- The last time I looked at the source it was hideous pre-ANSI C implemented with horrifying preprocessor abuses; this may be fixed now.
- The closure syntax is awkward and seems limiting to writing in a truly functional style - I want to be able to pass functions around like any other object, make functions that receive multiple functions as parameters, etc., without extensive additional syntax. (Caveat: I am still learning Ruby's peculiarities, so some of this may be doable, and my difficulties may stem from surface syntax issues and the confusion over the ways it is different it is from, say, Scheme, Dylan, NewtonScript, Self, etc.)
- Conventions for spelling variable scopes such as globals are enforced rather than just conventions
- Not quite multi-paradigm enough for my taste (why can't I work with plain functions, for example, instead of everything's-a-method?)
- Support for methods on singletons didn't do what I expected (but maybe I misunderstood)
- No compilation to machine code or C
- Duck typing doesn't seem consistently applied in the libraries
Anyway... I am a big defender of the principle that one should know many programming languages and use the one best suited to a particular task. I also not truly an experienced Ruby programmer yet, but so far my experience has been pleasant enough that it makes me want to use it wherever it is appropriate.
After seeing this article, I followed the instructions from the referred page,
o c111133460
also the article at
http://www.napcs.com/howto/railsonwindows.html#_T
My real goal was to debug Ruby on Rails programs with the plugin.
In theory I was able to do it, but not very usefully. I found that even a very
simple Rails program kept throwing off uncaught exceptions which kept stopping the debugger.
I could press the 'Continue' button to resume, but I would have to step through about
15 exceptions before the browser would be updated.
If this was fixed, it would be a very powerful IDE.
Unless I was very quick hitting the keys, the browser would time out. Something
needs to be improved before this would be a useful tool. Either Rails has to
be cleaned up to stop throwing those exceptions, or the plugin would need an
option to ignore those exceptions, if they are indeed normal.
--I want to be able to pass functions around like any other object
#Use Proc.new
p = Proc.new { } ; o.method( p )
--Not quite multi-paradigm enough for my taste (why can't I work with plain functions, for example, instead of everything's-a-method?)
# Works fine.
def hello()
print "hello world\n"
end
hello