Develop Rails apps with NetBeans 6.5 IDE

来源:互联网 发布:中国为何要建立网络墙 编辑:程序博客网 时间:2024/05/16 09:00

Develop Rails apps with NetBeans 6.5 IDE

I have been looking for a Rails IDE for long.  I used SciTE that comes with Ruby, but it really bothered me for the lack of a file tree explorer, and I hate to switch among many windows – explorer, console, MySQL admin, etc.  I tried some other free yet simple tools as well, though the pain is still there.  Among those I tried, RoRED is outstanding on Windows – if you are looking for something lightweight but convenient, try it yourself.

I heard NetBeans for some time, but I thought it would be a monster to play with – slow, and full of features that I would rather do it by command line than learning how to find one.  Last week I saw a friend was using it, and I decided to give it a try. 

I downloaded the Ruby edition (an optimized version without the horrible Java stuff).  The installation ran pretty smoothly, except for one thing – The UI appeared to be Chinese by default, as I am using Chinese Windows.  It spent me a half hour to fix it – add “--locale en:US” to the startup command.  I hope NetBeans guys could give an option in menu or ask for UI language during installation.  Nobody I know is using Chinese UI in development even in China – all terms become strange after translation.

One worry before I tried NetBeans was that I do not want to use JRuby.  Fortunately I found an option in menu to choose Ruby platform, and it took only several clicks to pick my favorite Ruby 1.8.6, good.  Then I imported my current Rails app, by clicking “create Rails project” and feed it my project folder.  Everything was running fine.

Soon I was bothered how to open the Rails console.  After some random searching, I found they are all in the right-click menu of the project root folder – migrations, generators, consoles, and more common tasks.

In coding, I think the best thing is code completion.  I found many new parameters of the methods seem familiar but never thought that they were upgraded with more power.  Now the windows for extra tools like MySQL admin, SVN client, web servers are gone, I got a neat environment to code.