Develop Ruby Applications Using SciTE Editor
- Develop Ruby Applications Using Eclipse IDE
- Develop Ruby Applications Using Komodo IDE
- Develop Ruby Applications Using SciTE Editor(this post)
- Develop Ruby Applications Using JEdit Editor
- Develop Ruby Applications Using Vim 7.0 Editor
In the first and second parts of the series “Popular IDEs For Ruby Development”, I have mentioned two of the excellent IDEs available for developing Ruby applications:
1. Ruby Development With Eclipse IDE
2. Ruby Development With Komodo IDE
Though these IDEs boast of a large number of useful features to help developers achieve higher productivity levels, some people might find the very same features to be needless quirks that come in the way of the software development. For all the programmers who swear by the rich functionality provided by an IDE like Eclipse, an equal number of programmers feel more comfortable and more productive with simple but elegant, fast to load editors like Emacs and Vi. One such popular editor which has got inbuilt support for the Ruby programming language is SciTE. I will discuss Ruby program development with the SciTE editor in this post; Ruby development with Emacs and Vim will be the topic of the next post in this series.
SciTE is actually one of my favourite editors to develop Ruby programs. The reasons are very basic: it’s light-weight, it’s fast, it has out-of the box support for the Ruby language(no plugins as in Eclipse or editing modes as in Emacs are needed to be installed) and it runs on multiple platforms including Windows and GNU/Linux. It also has got excellent support for the other programming languages(more than 40!) like C/C++, Java, Perl, Python and PHP. And of course its free in every sense of the word.
Open the SciTE editor from the system menu or from the command line, create a new file and save the file with .rb extension; the editor will automatically switch to the Ruby mode and will do the appropriate syntax highlighting for the code. The Ruby language can also be explicitly selected for the program currently being edited, by selecting Language->Ruby menu item.

Once the editing is complete, the Ruby program can be executed by selecting the menu item Tools -> Go or by pressing the F5 key.

A new pane will be opened on the right side of the window to run the script and it will show if any errors are present in the program, or the output of the program otherwise.

Once all the errors in the program are fixed, pressing the F5 key will show the output of the program in the right pane.

With fast load times, support for syntax highlighting and code indentation, ruby interpreter and ruby interactive shell being supported from within the editor, SciTE provides an excellent environment for Ruby application development. It doesn’t end here though; SciTE also allows a lot of customisations to be done to the programming environment according to the tastes of the programmers. To affect the global settings of the editor that apply to the settings of all the programming languages(not just Ruby), select Options -> Open Global Options File menu item.

As an example, scroll down to around line 100(View -> Line Numbers to view the line numbers) and search for a property called “tabsize” and change it to 4(or whatever you prefer). Or scroll down roughly to the line number 300 and increase/decrease the font size by editing font.base property(under your platform):

Settings specific to the Ruby mode can be customised by going to Options -> Edit Properties -> Open ruby.properties.

You will see a similar list of properties that were present in the global properties file and the values of specific properties can be edited in the same way.

Ruby interactive shell can also be used from within the SciTE editor to test simple Ruby expression before using them in the programs. Just place the cursor in the right pane(output window; go to View -> Output if it is already not visible), type the command ‘irb’ and press the ENTER key. You will be dropped to an irb shell where you can experiment with various Ruby expressions.

I prefer to work with the SciTE editor(not just for Ruby) for various reasons pointed out earlier in this post. Most important of them all are that its available for both Windows and GNU/Linux(it looks and works the same way in both these OSes) and it supports most of the programming languages that I use. If you open a lot of different files for editing during one marathon editing session, you can save the state for later retrieval by saving and loading the sessions. The program files can also be exported to different document formats like PDF, RTF, HTML etc(from File -> Export menu). If you are searching for a light-weight, fast, multi-platform programming editor, then SciTE will be a great option to consider.


































