Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Using the Ruby Dev-Tools plug-in for Eclipse 108

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."
This discussion has been archived. No new comments can be posted.

Using the Ruby Dev-Tools plug-in for Eclipse

Comments Filter:
  • by stoolpigeon ( 454276 ) * <bittercode@gmail> on Monday October 17, 2005 @06:05PM (#13812916) Homepage Journal
    Really.
     
    I think there is a plug in that should scratch just about any itch. Nice.
    • by Coryoth ( 254751 ) on Monday October 17, 2005 @06:25PM (#13813024) Homepage Journal
      I think there is a plug in that should scratch just about any itch. Nice.

      Indeed, the Python [sourceforge.net] and Perl [sourceforge.net] 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 [sourceforge.net] and Haskell and Ocaml [sourceforge.net] and SPARK [sri.com] and Scheme [eclipse-plugins.info] (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.
      • I can't find one for Objective C. I've been looking.
        • Wow, you're right, I can't find much beyond this [robrohan.com] which is a mutlipurpose plugin, but does at least support Objective C, though only really providing syntax highlighting and not all the goodies you can expect from other eclipse plugins.

          Jedidiah.
      • The Haskell plugin is pretty limited at this point. The Ocaml one even more so. But then, they are both considered alpha-level.

        As for non-supported languages, I haven't seen a plugin for occam or occam-pi yet...

      • You forgot CDT Project [eclipse.org] 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
      • Anything on Forth? I heard of a language module [apple.com] for BBEdit a while back. Just curious because of this article [slashdot.org] that came out some time ago .
    • by Anonymous Coward
      block / column mode cut/copy/paste support..

      mcedit supports it (shift-f3)
      ultraedit supports it (alt-c)
      vim supoprts it (through some odd macro based extension)
      emacs supports it (obviously)

      now, not all have as nice of a support as ultraedit (my fave editor), but eclipse lacks this *BADLY*.
      • [Eclipse lacks] block / column mode cut/copy/paste support..

        No, it doesn't. This is currently provided by the Lunar Eclipse [sourceforge.net] 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
        • [Eclipse lacks] block / column mode cut/copy/paste support..

          No, it doesn't. This is currently provided by the Lunar Eclipse project . . .

          That's not really block selection though, is it? Block selection is drawing a selection rectangle on the text and then being able to directly edit that block by typing or pasting some text. The Lunar Eclipse plugin doesn't get you a selection block on the screen that makes it obvious what you're selecting. It also doesn't let you directly edit the (unseen) block. You have

      • vim supoprts it (through some odd macro based extension)


        Isn't this just C-V? Seems to work for me in stock Vim. Not really on topic, I guess. Sue me :(.

    • The emacs plugin is fantastic. You can now run the whole of emacs inside Eclipse.

      The emacs developers are also hard at work on a complimentary cross plugin too I hear.

    • by Dan Farina ( 711066 ) on Monday October 17, 2005 @07:21PM (#13813314)
      ...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

      • ...Truly the emacs of this generation.

        How true!

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

        Hmmm... maybe we need a Elisp plugin ;-)

    • How about a free Vi plugin that doesn't suck? (There's only one vi plugin that I know of, it costs money, and it basically sucks.)

      If anyone's interested, I'm wanting to write one. I've got the Java skills, but I don't have the Eclipse-plugin-writing skills. Let me know if you can help out.

      Dlugar
    • Word wrapping?

      Dmaien
    • Personally, and this may sound stupid, but I'd like to see Eclipse understand Vi commands and behave as Vi does.

      the shortcuts that Vi uses are superior for me, and Eclipse (being the best Java IDE for me) I'd like to see Eclipse use Vi keyboard commands through a plugin.

      Anyone have a free plugin for that?
    • One word (acronym) SCP.

      There hasn't been a reliable SCP plugin for 3.x, only for 2.x days. Where did it go?
    • At our shop we us Eclpse to code in Java, PHP, C, C++ and Nulsoft Installation Scripts. This only leaves one language where we have to use note pad or TextPad. VBScript

      If anyone knows of a VBScript plugin for Eclipse please pipe up and make a crappy job (coding in VBScript) a bit less crapy.

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

      Eclipse.. the open-source massage chair...
  • RadRails (Score:5, Informative)

    by TedCheshireAcad ( 311748 ) <ted&fc,rit,edu> on Monday October 17, 2005 @06:05PM (#13812917) Homepage
    Making use of this and the Eclipse RCP, the RadRails [radrails.org] is also making a big contribution to the community.
    • Re:RadRails (Score:4, Interesting)

      by Trejkaz ( 615352 ) on Monday October 17, 2005 @07:13PM (#13813268) Homepage

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

  • 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!
  • Radrails (Score:5, Informative)

    by augustz ( 18082 ) on Monday October 17, 2005 @06:28PM (#13813045)
    Checkout RadRails [radrails.org]

    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.
  • RDT is good, but... (Score:5, Interesting)

    by MarkWatson ( 189759 ) on Monday October 17, 2005 @06:30PM (#13813050) Homepage
    ... 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.
    • But then real men use assembly ;-) --- means I am kidding... lighten up.
    • 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
    • I have not used eclipse, but I use KDevelop quite a bit. I supports quite a few languages natively. C/C++/Ruby/Python/Perl. It even has special QT projects for each of these languages.

      My biggest gripe (and it is hardly a valid gripe) is that KDevelop moves to quickly. I do think the current version is quite stable tho.

      I would welcome a comarison of the two by someone who has spent considerable time with both.

      Thanks
      • I haven't tried Eclipse, but KDevelop 3.2.x includes the following ruby features:

        • Syntax highlighting (it uses Kate)
        • Code folding
        • Class Browser
        • Shell window with irb
        • Qt Designer support with ruby code generation
        • Powerful debugger
        • Several QtRuby and KDE Korundum project templates

        Comparing features with RDT - it doesn't have a unit test front end, or an ri graphic front end yet. Apart from that they are pretty much equivalent as far as I can see.

    • I don't see why it can't be done though.

      IPython does autocompletion for Python methods and attributes on the command line.
      • IPython is an interpreter. PyDev is an IDE (Editor). In IPython, your program is already in run state. Not so in an editor. So it's comparing apples to oranges.

        IPython is not the first to do this either. PythonWin for example has had auto-complete for ages in it's internal interpreter.
  • Ruby..... (Score:5, Insightful)

    by james_in_denver ( 757233 ) <<james_in_denver> <at> <yahoo.com>> on Monday October 17, 2005 @07:04PM (#13813225)
    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" [rubyonrails.org]. 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.....

    • IMHO Ruby seems to have a "quirky" syntax. I checked it out for a short period of time and was thinking about adding it to my list of programming languages. I just don't care for the syntax. I could care less about it being interpreted, etc, it's the syntax that's killing it for me. 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.

      But, that being said, I really like Eclipse and use it for my Java coding. Maybe I'll gi
      • Re:Ruby..... (Score:4, Informative)

        by geniusj ( 140174 ) on Monday October 17, 2005 @07:38PM (#13813401) Homepage
        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.
        • 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.

          I totally agree. That, the clear documentation, and the familiar API (somewhat consistent with Java) are the three things that enabled me to learn it so fast.

          I have a rule I use when learning a new language

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

          This is not an example of a closure, but an example of a block. Of course this is compounded by the fact that closures are enabled by blocks. You probably don't need to worry about closures in order to pick up Ruby, but if you don't know what they are, they are well worth learning. The C equavalent to this particular code is a for loop:

          int i;
          for (i = 1; i =5; ++i) {
          printf("%s", i)
          } /* I believe this is syntactically corr
          • One could also argue that the code is an example of a ruby iterator. Either way, your C-code will segv due to the format string. s/%s/%d\\\\n/ and you'll be fine.
      • Re:Ruby..... (Score:4, Insightful)

        by pivo ( 11957 ) on Monday October 17, 2005 @08:04PM (#13813535)
        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.
        • I find it hard to believe that someone with a Perl background is complaining that Ruby has a quirky syntax.

          Heh... As someone with Python background, I definitely find Ruby syntax very quirky. My theory is that most Ruby users are people who started out with Perl and would never learn Python "because of the whitespace issue" (in truth they just didn't have a need, the time or what it takes to break old habits). Then as Python started becoming more and more popular, it became more and more difficult to adm

          • Unfortunately, Python is not 100% OO, so I'd just be jumping from one inconsistent language to another one. Granted, it is much more consistent than Perl.
          • Re:Ruby..... (Score:4, Interesting)

            by Samus ( 1382 ) on Monday October 17, 2005 @10:48PM (#13814238) Journal
            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?
            • Re:Ruby..... (Score:3, Interesting)

              by afd8856 ( 700296 )
              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.)
              • Re:Ruby..... (Score:2, Insightful)

                by Samus ( 1382 )
                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
            • > 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.

              Enforcing the use of scope operators to indicate scope was the best thing the Ruby authors did.
              I'm using C++ at work now and I fucking hate the half-assed naming schemes (hungerian notation, m before all class variables) we have to use because C++ doesn't force you to use this->

              I think in the future, all programming languages
      • IMHO Ruby seems to have a "quirky" syntax..I come from a C/Perl/Java background..

        In other words, you've only ever learned one syntax. That's kind of sad.

  • 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 Ruby plugin [jedit.org], 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 [blogs.com] if that's all you need.
  • RDT rocks. (Score:2, Insightful)

    by WWWWolf ( 2428 )

    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 XEmac

  • 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.
    • Ruby's pretty much a repeat of Smalltalk (Which is cooler, more powerful and has less people caring, and in people actually using it, was unsuccessful. But it did influence Java some) with "normal" syntax. Although I do hope Ruby overtakes that blastedly inconsistent language known as Perl.
      • I do hope Ruby overtakes that blastedly inconsistent language known as Perl.

        Them's fightin' words, sorta. That blasted inconsistentcy is why I love Perl. It's the Swiss Army Chainsaw of programming languages.

        Smalltalk!?! **choke** **gasp** **coke-coming-out-my-noise** It burnses! It burnses! Make it stop! I had to learn Objective-C (for WebObjects) which is a close to Smalltalk as I want to get. OK I'll take smalltalk over Java any day. Perl will always be the first programming language I fell in lov
    • Re:trollish comment (Score:3, Interesting)

      by JLyle ( 267134 )
      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
    • 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.
    • Then Rails is Ruby's Video Toaster. Rails is pretty hot, and it doesn't seem to be slowing down.


  • 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.
     
  • Pfffttt! Eclipse is lame. I use jEdit [jedit.org]. 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!
    • Text editor vs. IDE (Score:1, Informative)

      by Anonymous Coward
      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 applicat
    • I've found this too. When you're running a shitty laptop, every bit of fat really shows. jEdit is actually quite nice, and I'm not trying to toot hobo_sapiens horn either.
  • is that it forces a bunch of Ruby devs to run a Java program to get their work done...

    that must really roast their beans. har har...

    • 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 ove

    • nah, most Ruby coders are or were Java developers. I did java for five years. We just like Ruby better and feel it is much more powerful, beautiful and satisfying, as well as usually requiring one third or less the typing....
  • by Mustang Matt ( 133426 ) on Monday October 17, 2005 @10:15PM (#13814102)
    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?
  • by 5n3ak3rp1mp ( 305814 ) on Monday October 17, 2005 @10:59PM (#13814276) Homepage
    A pretty neat Ruby code editor on OS X is TextMate [macromates.com]. Some powerful stuff in there if you lie somewhere between the vi/emacs camp and the notepad/bbedit camp...
  • I tried the Ruby plugin for eclipse and it was too hard to get things to work. It all went together okay but when I started to use it, the thing kept on asking me for pathnames and which workspace to use. I had no idea which workspace to use, I just wanted to edit and run a ruby file.

    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.

    • Eclipse is a project based IDE not a plain old editor. If all you want is an editor then by all means pick up your favorite editor. If you want to work in a project mode then use an IDE like Eclipse.
  • After seeing this article, I followed the instructions from the referred page,
    also the article at

    http://www.napcs.com/howto/railsonwindows.html#_To c111133460 [napcs.com]

    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 w

There are new messages.

Working...