5

I am an experienced programmer and an enthusiastic new adopter of Ruby on Rails. I'm mostly using a mac, unix, and textMate, to get the job done. I've written some small apps on my own and am excited by the potential to write something more complex.

Should I commit time and resources to using (learning) an IDE for RoR? Please respond if you are someone who has used a configuration similar to mine and an IDE for RoR.

This is not a question about which IDE is the best, or which platform is preferred for RoR.

I'm more concerned with the cost/benefit of committing to any IDE that is built over a broad set of changing and evolving tools.

In addition, the detailed understanding of file structure and directory layout that just using a text editor fosters seems like a good skill to continue to grow as I broaden my use of the features in rails.

And... HTML, CSS, and ruby, are all well assessed with text editors that have the most basic formatting features.

On the plus side, I find IDEs that offer hand holding (templates, autocomplete text, etc.) for generating unit testing (TDD) with RSpec are appealing as this is an area in which I have limited experience.

My big worry is that I'll commit to an IDE, write an application, and then get stuck when ruby, rails, or some other key component I am using updates in a way that the IDE folks never anticipated. Using an IDE and periodically editing files or resources outside the particular IDE paradigm has burned me in the past. Previous gotchas have also included language features that an IDE did not account for well, thereby limiting development flexibility.

I'm also not sure if "local development"<->"remote server" integration/mirroring and version control are best handled through an IDE interface. git has impressed me as efficient and easy to use.

Is there a best approach here for undertaking a larger project, or are both methods O.K. with their associated caveats? Are my concerns about using an IDE outdated or warranted?

Thanks in advance for your comments -

Perry


Addendum: Seems there is some overlap here: Will using an IDE with Rails hinder me?


Conclusion: Lots of good food for thought. Thanks all. I am glad I began my Ruby and RoR learning with unix and a text editor. It's a great combo for the text laden environment that RoR lives in. rvm, git, rspec, gem management, and code generation are all well done from a command line. They made working through Hartl's Rails Tutorial, and playing with examples from "The Well Grounded Rubyist," easy. I am going to check out Rubymine's 30-day free trial. I expect the IDE will add to my initial understanding in (+) ways. Integrated unit testing was a big factor in my decision to try the IDE as I have stumbled with Rspec. I don't think my time (or money) have been wasted with textMate. Both were well spent.


ADDENDUM 2
I used Ruby Mine for 30 days. It was O.K. I did decide to stick with:

  • MacBook Pro
  • TextMate
  • git

... and they are all very good. I can switch very quickly between testing, coding, browsing, and version control. TextMate's 'Bundles' occasionally help as a CSS, Ruby, and Rails code reference.

I might also add that most of my 'troubles' stemmed from thinking I could just pick-up Ruby along the way. Nope. I had to read and experiment and read some more. "Getting" Ruby has really opened up Rails for me. If you too want to improve your Ruby, these helped me:

  • The Well Grounded Rubyist
  • Meta Programming Ruby
Community
  • 1
  • 1
Perry Horwich
  • 2,798
  • 3
  • 23
  • 51
  • 2
    In the past, I've used (in the following order) GVIM - Eclipse / Aptana - Netbeans - Textmate and then back to GVIM. Never looked back. One source that helped me to get up and running with VIM was http://github.com/carlhuda/janus. Its a MacVim distro/bundle with VIM plugins ready for Rails development. I based my plugins on this, and used Pathogen to load the scripts automatically. – Christian Fazzini Apr 29 '11 at 04:14
  • 1
    Thanks Chris. That's very helpful. Wish I could upvote your comment here as an answer. – Perry Horwich Apr 29 '11 at 13:59

3 Answers3

5

Most rubyists use a plain editor. What you need is the ability to jump to specific files easily, syntax highlighting, and really thats about it. Ruby is fairly succinct, and our class hierarchies are fairly flat, so you dont usually end up needing a lot of what an IDE offers.

Personally, I use vim with a bunch of plugins, and find myself more productive then I ever was in my Visual Studio years. I picked up a license for RubyMine awhile back during a sale, it is a fantastic IDE, and would probably use it if I couldnt use an editor for some reason.

If you want a recommendation, I would say vim with three plugins - Rails.vim (make vim more aware of rails and its structure), Command-T (great for jumping around between files quickly), and NERDTree - a graphical tree based file browser.

Like I said early, those capabilities are the most important thing for whatever you choose, so even if you dont go vim, make sure the editor you choose can do those things. CommandT especially, being able to fuzzy-find files at a keystroke will save you endless hours of clicking through gui file browsers over the course of your career.

Matt Briggs
  • 41,224
  • 16
  • 95
  • 126
2

If you are using Textmate, no need to change. That has everything you need. Just make sure to get the proper ruby/rails bundles and you should be good to go.

But the best bet would be to try a project on an IDE and then one on TM. See which works best for you.

nowk
  • 32,822
  • 2
  • 35
  • 40
  • Thanks nowk. I may yet go this route. Experimenting with an IDE, beyond it's most basic features, might be non-trivial. I also worry a bit about becoming dependent or locked-into someone else's development idiom, particularly with evolving opensource tools. – Perry Horwich Apr 29 '11 at 00:36
2

Ruby is not a statically typed language so much of the benefit you gain from an IDE auto-completion isn't available. A few Ruby IDEs try to be intelligent about this (RubyMine, NetBeans, etc) and do a fair job but their unbearably slow.

You'll find that once you've committed to the shortcuts that TextMate provides, you won't miss your IDE.

As far as hand-holding goes, check out Railscasts and Rails Guides. I think you'll find that spending time on those two sites will fill in 80-90% of the "conventions" you'll need to get started.

Paul Alexander
  • 31,970
  • 14
  • 96
  • 151
  • what kind of dynamic language IDE doesn't do autocompletion? Never really seen that before – Matt Briggs Apr 29 '11 at 00:38
  • Thanks Paul. Makes sense. Still, rails puts such a high value on convention, that I find some templating or autotext reassuring. Just seeing a list of recommended options for unit testing lends to a justifiable feeling that I am converging on "best practice." – Perry Horwich Apr 29 '11 at 00:41
  • 1
    @Matt: Many of rails dynamic features such as model attributes are built and generated at runtime. This isn't something that an IDE can introspect from the code. Some actually run a version of your site in the background and steal state from the running server to provide the auto completion. – Paul Alexander Apr 29 '11 at 00:41
  • 1
    @Perry: TextMate has quite a few templates. Seeing as the entire rails team and many of the most involved ruby community members use TextMate, it is likely to always have the most up to date support. – Paul Alexander Apr 29 '11 at 00:43
  • 1
    Actually, active record attributes is one of the only major things like that in rails, and from my experience you tend to get fine autocompletion from them (probably because the ide reads the db schema). Like, 99.999% of methods are going to come in from a class definition, or a mixin, both of which are easily parseable. I've used wing for python, aptana for javascript, and a few different rails IDEs, and find the autocomplete pretty much the same as what you find for C# and Java – Matt Briggs Apr 29 '11 at 00:50