How I use Netbeans 6 With Ruby on Rails
Netbeans 6.1 for Ruby on Rails is a great alternative to using textmate or vim for editing Ruby on Rails applications on a Mac. What I try to do is avoid using some of the features that Netbeans provides. Here are a list of the features that I have found to be useful in the Netbeans IDE and the things I still do in the bash terminal:
NetBeans
Command AutoCompletion
When you start typing a method name our attribute the auto completion will kick in and show you the possible commands.
Migrations
It makes it easier to do migrations so you don’t have to remember or type version numbers. All you have to do is right click the project and run a migrate.
Creating Files
Adding new files are easy in Netbeans you can copy and paste old files to create a new file or just right click and got to new file.
Navigation
The navigation menu in Netbeans allows you to easily find files in rails. The most useful shortcut that I have found is Control-Shift-O (Go To File) which uses auto complete to take you to the file you choose.
Database Connections
If you decide to use a database other than the default SqlLite, you would be better of creating a connection in Netbeans and managing it there. This way you can view your database structure and test SQL commands.
Bash Terminal
gem/plugin installs
Most of the tutorials for gems and plugins will be using commands for the command line so it’s just easier to install these this way instead of using the wizards that Netbeans provides.
Running Mongrel
It’s just easier to stop and start your Mongrel web server from the command line by running ruby script/server than trying to do it in netbeans.
Git
If you are using git for version control, you will be smarter to run your git commands from the command line instead.
Script/Console
If you are not familar with script/console it allows you to access your rails models and other stuff from the command line and run commands to test things out. For instance, if you have a Post model, you can run the Post.first command to see the first post in the model. Netbeans has a console also where you can run these commands so this one is up to you.
