Slashdot Mirror


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."

28 of 108 comments (clear)

  1. What doesn't Eclipse do? by stoolpigeon · · Score: 2, Funny

    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?
    1. Re:What doesn't Eclipse do? by Coryoth · · Score: 5, Informative

      I think there is a plug in that should scratch just about any itch. Nice.

      Indeed, the Python and Perl plugins are both very nice and from the look of it more featureful than the Ruby plugin at the moment (though I expect it's only a short matter of time before that evens out). I think its more a matter of what languages aren't currently covered? There are apparently plugins for Eiffel and Haskell and Ocaml and SPARK and Scheme (though I can't vouch for quality on any of those) and pretty much anything else you can imagine (given that those were random searches on my part).

      Jedidiah.

    2. Re:What doesn't Eclipse do? by John+Whitley · · Score: 2, Informative

      [Eclipse lacks] block / column mode cut/copy/paste support..

      No, it doesn't. This is currently provided by the Lunar Eclipse project, which publishes a few Eclipse plugins. Specifically, look at the rectangle copy/cut/paste/edit operations in the Editor Enhancements plugin created by that project. (Note: the Emacs-style Alt-/ completion mentioned on these pages was integrated as a part of Eclipse itself.)

      Also, Eclipse has a useful stock feature which covers one use case for rectangular edits: block indent change. Highlight a few lines of text, then hit tab/S-tab to increase/decrease the indent of all highlighted lines uniformly. It's such a simple feature, but I love it.

    3. Re:What doesn't Eclipse do? by Dan+Farina · · Score: 4, Insightful

      ...Truly the emacs of this generation.

      From vi, to emacs, to eclipse (ratios of memory usage in each generation maintained!)

      I actually do not like the eclipse editor component as much as emacs. Ideally, I'd want the GUI-esque browsing/completion/etc of eclipse with the emacs editor. (There have been attempts at this, but none of them feel "right")

      It's also harder to write ad-hoc extensions to an eclipse plugin, which is one large benefit emacs has over it.

      df

    4. Re:What doesn't Eclipse do? by Mechanik · · Score: 2, Interesting

      You forgot CDT Project for C and C++ development. The project is growing in popularity to the point where we're having our own developer's conference in a couple of weeks, totally separate from EclipseCon.

      It's starting to seem like everyone and their brother that's doing a C/C++ IDE is standardizing on CDT. If the trend continues, perhaps one day we will unseat Visual Studio as king of the heap, although there is a long way to go still.

      The most important thing I can say, regardless of your language of choice, is to grab a keyboard and lend a hand, if you're able, to your favourite project. Eclipse (and CDT especially) are community driven, and the best way you can help these tools succeed is by giving us some of your spare cycles, even if it's just filing the bugs that you find. If you submit patches for them along with the bug report we'll love you forever :-)

    5. Re:What doesn't Eclipse do? by DamienMcKenna · · Score: 2, Funny

      Word wrapping?

      Dmaien

    6. Re:What doesn't Eclipse do? by Anonymous+Writer · · Score: 2, Interesting

      Anything on Forth? I heard of a language module for BBEdit a while back. Just curious because of this article that came out some time ago .

  2. RadRails by TedCheshireAcad · · Score: 5, Informative

    Making use of this and the Eclipse RCP, the RadRails is also making a big contribution to the community.

    1. Re:RadRails by Trejkaz · · Score: 3, Interesting

      RadRails is great, but the setup is a bit of a pain in the butt. I have to tell it where Ruby is, for instance... something it doesn't even need to know. It could just run "ruby" and let the path take care of it.

      But anyway, any steps towards autocompletion and automated code refactoring for Ruby are fine by me. And moving into an IDE which is capable of these things is a step. :-)

      --
      Karma: It's all a bunch of tree-huggin' hippy crap!
  3. Radrails by augustz · · Score: 5, Informative
    Checkout RadRails

    RadRails is an integrated development environment for the Ruby on Rails framework. The goal of this project is to provide Rails developers with everything they need to develop, manage, test and deploy their applications. Features include source control, debugging, WEBrick servers, generator wizards, syntax highlighting, data tools and much much more.

    The RadRails IDE is built on the Eclipse RCP, and includes plugins from RDT and Subclipse. The RadRails tools are also available as Eclipse plugins.

    Uses RDT plus others, and a nice, clean install.
  4. RDT is good, but... by MarkWatson · · Score: 4, Interesting

    ... 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.

    1. Re:RDT is good, but... by mctk · · Score: 2, Funny

      I hard wire all of my applications.

      --
      Paul Grosfield - the quicker picker upper.
    2. Re:RDT is good, but... by hutchike · · Score: 2, Interesting

      I agree. Auto-complete is the one thing that we could really do with here, but is sadly lacking. Sure I can press Ctrl+space and get a Ruby language list, but I really want to see methods available on the current object. This is not possible today. Having said that, RDT is WAY WAY better than the alternatives. Having installed Mondrian, Scite and FreeRide, RDT on Eclipse blows them all away. Regarding RadRails, yes it's nice but it's not a huge leap forwards from RDT - it just adds server start/stop in a new "Rails" perspective. Here's a toast to Ruby as the Web 2.0 language of choice for rapid and happy web development!

      --
      Zen tips: Pay attention. Don't take it personally. Believe nothing.
  5. Ruby..... by james_in_denver · · Score: 4, Insightful
    It rocks...... I'm using Ruby at work to parse millions of lines of source code across 4 different systems and link that back to literally hundreds of requirements documents. The end result is stored in a database and made available via "Ruby on Rails" . It's saved the client literally hundreds of hours of debugging and integration time, and the "documentation"? It never gets out of date... Just run the programs against the source code and document repositories nightly and everything is current.....

    And Eclipse? simply the best development IDE available IMHO...... And all of that in only a few thousand lines of code.....

    1. Re:Ruby..... by geniusj · · Score: 3, Informative

      I come from a C/Perl/Java background, and Ruby just seems too different I can't tell whether it's work taking the time to learn or not.

      Once you learn it, you'll find that it is very consistent throughout development. You don't need to worry about certain syntax not working in certain situations, etc. Language consistency is the main reason I use Ruby. If I don't know it, I can guess and be right 95% of the time. It's almost creepy.

      That said, I'd have to imagine that closures are the main issue you have with Ruby's syntax, since that's really the only part of Ruby's syntax that differs from other scripting languages.

      e.g.

      1.upto(5) do |number|
          puts number
      end
      1
      2
      3
      4
      5

          Just know that closures are incredibly powerful and can be used to simplify a great deal of things. Don't let the use of |s turn you away.

    2. Re:Ruby..... by pivo · · Score: 3, Insightful

      I find it hard to believe that someone with a Perl background is complaining that Ruby has a quirky syntax. I think if you spend a little more time with Ruby you'll find that it has a nice, well thought-out syntax. I think you'll also come to think of Perl as the real quirky language.

    3. Re:Ruby..... by Samus · · Score: 4, Interesting

      You know, I tried Python for a while. It really is nice with the builtin data structures and the slicing and dicing that you can do with sequences. The whitespace thing is kind of annoying. I like having {} or do end or begin end markers around my code blocks. I think it is one feature that they Python community should just give up on. It really is holding the language back. For example it can't easily be embedded into web pages (has it been truly done at all?) because of the whitespace issue. Just about all of the popular languages out there that can be used to generate web pages just use the language itself for embedding. I remember back in 2000 using the Python ASP integration on windows to embedd Python and it wasn't much fun. Another thing that bothered me about Python were the core modules. They just didn't seem consistent and as well structured as what Java uses. Sure there are weird things in weird places in Java but overall I prefer the class libraries available to Java over the Python ones.

      I'm currently giving Ruby a shot implementing a little project and so far I find it ok but the syntax in Python or Java definitely seem cleaner. Having to use punctuation to help the compiler|interpreter figure out scope (think @'s in front of variables for object vars) is just plain lazyness on the part of the authors.

      The last thing I'm having trouble getting over is the dynamic nature of the languages. Static typing seems to be such a nice warm cozy safety blanket that it is hard to give up. I see where it can be powerful and useful and allow you to take many shortcuts. In fact much of Rails would be impossible without the dyanamic typing and openness of the class structure, but I miss the static class definitions when working with my model objects. It gives me a weird feeling to have to look at the tables themselves so I can figure out what the attributes on my obects are. Yes I know DRY...

      It'll be an interesting next few years to say the least. Maybe Ruby will be the next big thing or maybe something else will. I for one would like to see a revamped Python that took the things they did right and fixed the things they did wrong. Perl 6 anyone?

      --
      In Republican America phones tap you.
    4. Re:Ruby..... by afd8856 · · Score: 2, Interesting

      Python encourages good programming practices.
      Among other, indentation, always document, short code modules, and best of all DO NOT EMBED CODE IN WEB TEMPLATES!
      Take a look at ZPT (and possibly Kid) if you need to understand why you shouldn't do that. (they succesfully survive round tripping through HTML visual editing, generate only valid html, etc.)

      --
      I'll do the stupid thing first and then you shy people follow...
    5. Re:Ruby..... by Samus · · Score: 2, Insightful

      I see no problem with embedding code that deals strictly with presentation. I wouldn't advocate putting business logic into a page and in fact would whack someone upside the head if I caught them doing that. In this day and age there is no excuse for it. Even php has templating capability. The real issue is having to learn a second language to do it. I'd rather learn a small api to do presentation than a whole new template language. A loop in an rhtml (rails) file is the same as it is in ruby just as a loop in asp and jsp is the same as their respective languages. Ok java tag libs can go a little too far sometimes but I don't have to use them if I don't want to.

      What exactly in Python encourages short code and documentation? I would venture to say that it is more the community that encourages this practice and not the language itself. Indentation is an easy one as long as everyone on your team uses the same indentation scheme. I may look at Kid someday if I ever get the urge to look more deeply at Turbogears. Though I was kind of surprised and a bit disgusted to see in the demo video that to do a redirect the guy had to raise an exception. I don't see how exceptions as flow control can be considered a good practice.

      --
      In Republican America phones tap you.
  6. RDT rocks. by WWWWolf · · Score: 2, Insightful

    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.)

  7. Re:trollish comment by JLyle · · Score: 3, Interesting

    I know you're just trolling (and being honest about it), but I just got back from the fifth annual Ruby Conference. The attendance at this year's conference was three times what it was at last year's, due in no small part to the success of Rails over the last year. The latest Rails book, Agile Web Development with Rails, is hovering around the number two spot on Amazon.com's list of popular "Computers & Internet" books. I'm told that they've sold some 20,000 copies of the book since it was published in July. So, apparently, someone cares...

  8. Re:trollish comment by meatball_mulligan · · Score: 2, Interesting

    Actually, I think Ruby might just be picking up some steam, thanks to Rails. David Heinemeier Hansson won the "Hacker of the Year" award at OSCON for Rails. Just about every week it seems like I see a new article in this magazine or that one about it. Ruby has surpassed Python in Japan. Who knows?

    m.m.

  9. Re:trollish comment by jericho4.0 · · Score: 2, Insightful

    Then Rails is Ruby's Video Toaster. Rails is pretty hot, and it doesn't seem to be slowing down.

    --
    "A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
  10. Re:the best thing about this by chaves · · Score: 2, Insightful

    The JVM and the J2SE class libraries are the most important contributions made by Sun under the Java technology umbrella. The Java language itself is irrelevant. Many people dislike the language syntax, and they have the right to do so. Syntax is a matter of taste - everybody should be able to program using the language they like the most (for the task at hand). But portability, interoperability, security, and other core features of the Java runtime are often underestimated.

    People should stop fighting over language syntax and recognize that what we should be striving for is a feature-rich platform independent runtime, and that is what Java is in its essence. Groovy, Jython and JRuby are initiatives that recognize that.

  11. Does this support dynamic variable highlighting? by Mustang+Matt · · Score: 3, Interesting

    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
  12. Nice Ruby OS X editor: TextMate by 5n3ak3rp1mp · · Score: 3, Insightful

    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...

  13. Re:Why is Ruby gaining such media attention? by TerrapinOrange · · Score: 4, Interesting

    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.

  14. Re:Why is Ruby gaining such media attention? by DJSpray · · Score: 2, Interesting

    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.