Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I just started writing some ruby in my spare time and am currently using Netbeans 7 with the Ruby and Rails plugin v0.111. I'm primarily a Java programmer coming from IntelliJ and Eclipse.

One downside of my Ruby programming setup is that my Netbeans isn't very helpful when it comes to code completion. This seems due to the fact that Ruby is not strongly typed and since the IDE doesn't know the type it can't suggest methods. As a result I must spend a lot of time in my browser looking at documentation and switching back to my IDE to manually type in the method there.

Are there any changes I can make to my setup to get code completion for Ruby or is it pretty much impossible due to the nature of the language? How do other developers work with Ruby, other than memorizing all the methods in the Core Library?

share|improve this question
    
There is nothing you can do. That's just the consequence of using a poorly typed language. –  ThomasX Aug 17 '11 at 6:54
2  
@ThomasX: this is BS. Dynamically typed languages had graphical IDEs with code completion long before statically typed languages had graphical UIs, or IDEs, or code completion. Poor code completion is a result of a poor IDE, it has nothing to do with static or dynamic typing. –  Jörg W Mittag Aug 17 '11 at 10:08
    
There are IDEs with Javascript code completion, another weakly-typed language. –  Alan B Aug 17 '11 at 12:14
    
....and PHP. Its definitely doable. –  Jarrod Nettles Aug 17 '11 at 13:17
add comment

2 Answers

up vote 6 down vote accepted

Rubymine does it better than most (not surprisingly, coming from the guys who brought you IntelliJ), but of course there are always going to be limitations with a dynamic-typed language like Ruby or Python. This is always going to be one of the costs of going to one of those languages.

But, for some people, the core libraries are pretty easy to learn and the Pickaxe book is an excellent Ruby core library reference. Likewise, The Rails 3 Way is an excellent Rails reference.

It's all a question of whether you think the benefits of a dynamic-typed language outweigh that cost. Not all do. If not then stick to a static-typed language.

share|improve this answer
    
My experience found that the core libraries are better than easy to learn- after getting the very basic semantics I found that most of the time I just had to think of what I would ideally like the method names to be and that would turn out to be their name. I have found no other language half as intuitive to use. –  glenatron Aug 17 '11 at 14:04
    
I used Eclipse initially (4 months), then Netbeans (4 weeks), finally rubyMine. rubyMine is the bees knees :) –  junky Feb 28 '12 at 21:53
add comment

You said you are coming from IntelliJ IDE.
The good news is that you can install Ruby/Rails plugin for IntelliJ. However the plugin is a little bit older than the one the is used to power RubyMine.
But JetBrains folks are always updating it. Give it a try.

No one memorize all the methods in any given programming language.

Check these two resources:
Ruby-Doc.org and RubyDoc.Info

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.