This topic describes common tasks that you can perform with NetBeans Ruby and Ruby on Rails projects that are open in the Projects Window. For more detailed information, click the links in the right column.
To perform this task...
Follow these steps
Create a new Ruby or Ruby on Rails project
Choose File > New Project from the main menu to open the New Project wizard.
Select Ruby in the Categories list.
In the projects list, select either Ruby Application or Ruby on Rails Application.
To migrate a database for a Ruby on Rails project (for example, add tables that you have defined in a model), right-click the main project node in the Projects window and choose Migrate Database > To Current Version.
You can also revert the database to an earlier version by choosing one of the other To Version choices.
For an example, see
in the tutorial "Creating a Ruby Weblog in 10 Minutes".
For instructions on adding some common databases, see
in the "Installing and Configuring Ruby Support" web article.
Run a Ruby or Rails application from the IDE.
If your project is not the main one, right-click the project node and choose Set as Main Project.
Click the Run Main Project toolbar button or press F6 or choose Run > Run Main Project from the main menu.
You see a Ruby project's output in a window at the bottom of the IDE.
A Ruby on Rails project runs in the server configured for Rails and displays in your default browser.
To stop the server, click the X button to the left of the server window at the bottom of the IDE.
Run a controller or view file
If you're in a controller or view file, press Shift-F6 to run the current file. Doing so starts the web server unless it's already running, then opens the browser on the URL corresponding to the current file.
Run tests on your project
For quick testing when editing a view or controller file, use Ctrl-F6, or Command-F6 on a Mac platform, to run the tests associated with the file.
For full details on testing Ruby and Rails projects, see
Debug a Ruby on Rails application
If you are using the default JRuby interpreter, you can use only the standard debugger.
If you have changed your interpreter to the native Ruby interpreter, you can use the Fast Debugger.
To debug a Ruby on Rails application, choose Run > Debug Main Project from the main menu.