Ruby In Steel Archives

Back to -Ruby In Steel Archives

Ruby In Steel – Hints and Tips

Various bits and pieces of information that may help you to use Ruby In Steel more effectively...

If you have a problem or can’t figure out how to do something be sure to check the online documentation first, including this page.

Using The Rails Generate Dialogs

Steel 0.7

The Generate dialog lets you run Rails scripts without having to go into a command prompt to do it. Currently the available scripts are:

- Controller
- Model
- Scaffold
- Other

These are equivalent to running the following scripts at the command prompt:

- ruby ./script/generate controller
- ruby ./script/generate model
- ruby ./script/generate scaffold
- ruby ./script/generate

So, for example, if you want to run this script…

- ruby ./script/generate controller Blog

…select the Controller option and enter Blog in the Value field.

To run this script…

- ruby ./script/generate scaffold Post Blog

…select the Scaffold option and enter Post Blog in the Value field.

Running Rake

Rake has its own item on the Rails menu (it also has its own ‘leaf’ icon on the Rails toolbar). Clicking this is equivalent to running rake from the command prompt:

- rake

You just enter the command to rake in the Rake command field

Viewing Output of Rake or Scripts

The output from these commands is printed in the General page of the Visual Studio Output Window (if this is not visible, select the View menu then Output and make sure General is selected from the drop-down list). To try this out, click the Rake item on the Rails menu and, in the Rake command field enter:


This should display help on Rake in the General page of the Output window.

Open a Command Prompt

If the built-in dialogs don’t give you the features you need you can easily open a command prompt to run a script or load up a program in a selected directory. Just right-click a folder or a file in the Solution Explorer and select Command Prompt from the popup menu.

Bookmark and Share   Keywords:  ide
© SapphireSteel Software 2014