Every Flavour Beans

“The time has come…to talk of many [technologies].” –Lewis Carroll(’The Walrus and the Carpenter’)
Development Tools. Web Frameworks. GNU/Linux. Nokia N800. Video Encoding.

August 29, 2006

Develop Ruby Applications Using SciTE Editor

Filed under: GNU/Linux, Ruby/Rails — tabrez @ 10:15 pm

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.
Ruby Program in SciTE

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

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.
SciTE shows any errors in the Ruby programs

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

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.
Global Settings in SciTE

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):
Change font properties in SciTE global settings

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

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.
Change properties in SciTE Ruby settings

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.


If you want to receive future posts by email, enter your email address here:

Related Posts:

  • Programming in Ruby Using SciTE - Windows Issues and Other Tips
  • Develop Ruby Applications Using JEdit Editor
  • Installing Ruby on GNU/Linux(Gentoo, (K)Ubuntu, Fedora, SUSE) And MS Windows
  • Develop Ruby Applications Using Komodo IDE
  • Develop Ruby Applications Using Eclipse IDE
  • Develop Ruby Applications Using Vim 7.0 Editor
  • Setting Up Rails Development Environment on Windows Vista/XP

  • August 27, 2006

    Develop Ruby Applications Using Komodo IDE

    Filed under: GNU/Linux, Ruby/Rails — tabrez @ 5:34 pm

    Komodo is another excellent IDE for developing Ruby, Perl, Python, PHP and Tcl applications. Unlike it is with developing Ruby applications in Eclipse, no additional plugins need to be installed for Komodo; the Ruby support is inbuilt in this IDE. The IDE also has built-in support for integrating with source control software(in professional edition only) like CVS, Subversion and Perforce. All these software only need to be installed and in path for Komodo to start using it.

    Downloading and Installing Komodo IDE

    Download the Komodo IDE from the following page:

    Buy Komodo Personal or Professional Edition
    Try Komodo Personal or Professional Edition

    After getting the software downloaded, the installation is as easy as running a couple of commands, as it comes with its own installation script. I recommend installing the IDE in the user’s home directory, but if multiple users access the computer, and want to use Komodo, then it can be installed in the system path too.
    Run the following commands to install Komodo in the home directory:

    sh# tar -xvzf Komodo-Personal-3.5.2-227956-linux-libcpp5-ix86.tar.gz
    sh# mv Komodo-Personal-3.5.2-227956-linux-libcpp5-ix86 komodo3.5
    sh# cd komodo3.5
    sh# ./install.sh

    (substitute the name of the downloaded file in the above command.)

    Answer the questions asked by the installer(like where to install Komodo) or accept the default values. To add Komodo application to the path, add the following line to the user/system profile file(eg: ‘.bash_profile’):

    export PATH=/home/user/komodo3.5:$PATH

    Before Komodo can be used, a license has to be properly setup. You might have recieved a license file through email while purchasing the product; you can request a license for the trial version otherwise, if you want to evaluate the product. Once you get hold of a license, its time to install it. I have a license for Komodo Personal Edition and this is how I have installed it:

    sh# chmod +x License-KomodoPersonal-Linux
    sh# ./License-KomodoPersonal-Linux

    The file name of your license may be different depending upon the version of Komodo you are using.

    After the installation is complete, a shortcut link for the Komodo IDE can be seen on the desktop. Click the icon to start the IDE(or run ‘komodo’ on the command line):
    Komodo Desktop Icon

    Create Ruby Applications Using Komodo IDE

    Komodo IDE starts with the following welcome screen. From here you can create a new project, open the existing projects or browse through the various tutorials.
    Komodo Main Window

    To browse through the Ruby tutorial and reference, click the “Ruby Tutorial” link in the main window. The tutorial will be opened in a new browser window.
    Komodo Tutorial Window

    Editing Ruby programs in Komodo in full screen mode looks like this(Syntax is colorised, indentation is done etc. Usual stuff expected of an IDE).
    Komodo Fullscreen Editor

    To create a new Ruby project in Komodo, select File->New Project, enter a name for the project and click the “Save” button. Now create a new Ruby file by selecting File->New File and selecting “Ruby” from “Templates”.
    Create New Ruby File in Komodo

    Type the program in the editor and save the file.
    Sample Ruby File in Komodo

    To evaluate simple Ruby expressions, Ruby interactive shell can be used from within Komodo. Select “Start New Ruby Shell” from the drop down box in the toolbar(or Tools->Interactive Shell menu) to start an interactive shell. Evaluate the Ruby expressions in the newly opened ‘Ruby Shell’ tab at the bottom of the window.
    Ruby Interactive Shell in Komodo

    The Ruby interactive shell can be made the default shell in Komodo and be bound to F12 hot key from the Preferences(Edit->Preferences) dialog box.
    Ruby Interactive Shell in Komodo

    End Notes

    Komodo IDE provides a very rich program development environment for many popular scripting languages like Ruby, PHP, Perl, Python and Tcl. The personal(non-commercial) edition has most of the features of the professional edition and costs only tenth of its price. You may also get lucky and be able to find a discount coupon on the Internet to buy the personal edition of Komodo free of cost. Moreover, one license of Komodo(whether personal or professional) allows the software to be run on multiple platforms like Windows and GNU/Linux. If you want to use one IDE to develop programs on multiple platforms and using multiple scripting languages, without the hassle of installing additional plugins to get such a support, then Komodo is definitely worth a try.


    If you want to receive future posts by email, enter your email address here:

    Related Posts:

  • Develop Ruby Applications Using SciTE Editor
  • Develop Ruby Applications Using Eclipse IDE
  • Programming in Ruby Using SciTE - Windows Issues and Other Tips
  • Develop Ruby Applications Using JEdit Editor
  • Setting Up Rails Development Environment on Windows Vista/XP
  • Installing Ruby on GNU/Linux(Gentoo, (K)Ubuntu, Fedora, SUSE) And MS Windows
  • Setting Up Rails Development Environment on Ubuntu GNU/Linux

  • August 25, 2006

    SixApart’s Vox Is Blogging With Community Feel

    Filed under: General, Web — tabrez @ 12:17 pm

    Think about your favourite blogging service(blogger.com, wordpress.com etc) and think about all the fun you have at community sites like MySpace, Live Spaces, Orkut etc and then combine these two environments: You get Vox, the new blogging service from SixApart, for those who love to blog but love the community feel too. Though most of the community websites too support blogging, Vox is a blogging service foremost, and communities are created around these blogs.

    Vox is still an invite-only, beta service. If you are interested, you can place a request for an invite and then wait for it to arrive. Or hunt the Internet for a spare Vox invites from the existing Vox members. I had got an invite several weeks ago from SixApart but didn’t quite feel motivated to start using it. It does have some features that are lacking in most of the free services, like convenient way of adding youtube videos, flickr/photobucket pictures, books from Amazon.com etc. Here is a visual tour of the service for those who don’t have an invite to check out how the interface of Vox looks like.

    Composing blog entries is a child play with no HTML knowledge needed. Inserting images, videos etc is easier than in other free services. Tags can be attached to every individual blog entry.

    Adding and organising a collection of media files is simple from the following interface. The media files thus added are accessible while composing the blog entries.

    Upload photos from your computer, flickr account, photobucket etc to Vox Library.

    Upload videos from your computer, Youtube etc to Vox Library.

    Comments can be added to the pictures too.

    One of the following layouts can be selected for a blog. The Vox team keeps adding new layouts and themes to go with these layouts at regular intervals so that the users have a good collection from which to choose a favourite look for one’s blog. Two column and three column layouts are available for selection.

    Select which modules you want appearing in the sidebar of the blog. Similar to Wordpress Widgets.

    This is how the neighbourhood looks like. The appearance depends on who is present in your neighbourhood.

    Vox team keeps sending invites to existing Vox members so that they can invite their friends to Vox. If you are desparate to try out this service, you can consider sending a request on the SixApart mailing list.


    If you want to receive future posts by email, enter your email address here:

    Related Posts:

  • Free Software Community Catching Up to Social Networking Trend
  • Why I Moved My Blog From Wordpress.com
  • Windows Live Writer: A Slick And Powerful Blogging Tool From Microsoft
  • Five Desktop Blog Editors for GNU/Linux Users
  • Six Popular IDEs For Developing Software in C/C++ on Windows Platform
  • A Case Against Ajax Web Development Model
  • What is New in Wordpress 2.3 (Beta 1/2)?

  • August 12, 2006

    Develop Ruby Applications Using Eclipse IDE

    Filed under: GNU/Linux, Ruby/Rails — tabrez @ 1:10 pm

    Eclipse is one of the most popular programming IDEs available today. Very few development environments can stand against it in terms of features or ease of use. Except for editing very small/few number of files, for which the fast responsiveness of the simple editors might be more desirable, Eclipse is becoming the most preferred development environment. Its flexible plugin system has allowed the community to work towards enhancing/adding new functionality to the core product, just like it happened with emacs. The open source license and the plugin system has aslo meant that the IDE today supports most of the popular programming languages making Eclipse far more that just a Java IDE. One such language supported by Eclipse with the support of plugins is Ruby. If you are a Ruby/Rails developer, then you must definitely give Eclipse + Ruby plugin a try.

    Download and Install Eclipse

    Skip this section if you already have Eclipse installed on your system.

    One way to install Eclipse would be to use the appropriate package manager for your distribution like apt, emerge, yum, yast etc. If you want the latest version though, downloading it separately and uncompressing it in the home directory would be an ideal way. In this case, follow these steps:

    1. Download Eclipse from here.
    2. Extract the downloaded file in the home directory(say /home/user).
    3. Make sure atleast the Java runtime(JRE) is installed(complete Java SDK is required to create Java programs from Eclipse) on the system. Go to the extracted directory and run the ‘eclipse’ executable file to check if everything is working properly.

    Downloading and Installing Ruby plugin for Eclipse

    Follow these steps:

    1. Download the Ruby plugin for Eclipse by selecting a mirror from here
    2. Extract the downloaded file in a temporary directory(say /home/user/temp).
    3. Copy the contents of the extracted directory in the corresponding Eclipse folders:
      /home/user/temp/features/* —-> /home/user/eclipse/features/
      /home/user/temp/plugins/* —-> /home/user/eclipse/plugins/

      (Use the path to the Eclipse installation folder if its not installed in the home directory).

    4. Confirm if the Ruby plugin is successfully installed by starting the eclipse IDE and going to Help->About Eclipse SDK->Plug-in Details.
    5. Scroll down the list of installed plugins to find the Ruby plugin.

    Configure the Ruby plugin

    Before being able to create Ruby programs from Eclipse, we need to provide it with the information regarding where Ruby is installed. If Ruby is not already installed, then install it first. Then follow these steps:

    1. Start Eclipse IDE and go to Window->Preferances->Ruby->Installed Interpreters->Add.
    2. Enter the following details:
      Interpreter Name: ruby
      Location: /usr/bin/ruby

      To find the location where ruby is installed on your machine, run the following command:

      sh# which ruby
      /usr/bin/ruby

    3. Now go to Window->Preferances->Ruby->Ri/rdoc and enter the following information:
      RDoc Path: /usr/bin/rdoc
      Ri Path: /usr/bin/ri

    4. Fill whatever location you have found out in the earlier step using `which` command.

    Creating a Sample Ruby Application From Eclipse

    1. To create a Ruby application, create a Ruby project from File->New->Project
    2. Select Ruby->Ruby Project. Click ‘Next’, enter a project name and click ‘Finish’.
    3. Select File->New->Ruby Class to create a new class or select File->New->File to create a simple Ruby file. Type a program in the editor and save it.
    4. Now right-click on the file name and select Run As->Ruby Application to run the script.
    5. You can also debug the Ruby programs from within Eclipse. Click the ‘Debug’ button on the toolbar and select a Ruby script to start debugging it.

      The debugger is started and ready.

    Other excellent development environments for Ruby application development include Komodo IDE, Emacs, Vim, SciTE etc. I will try to write about these development environments in the next few posts.


    If you want to receive future posts by email, enter your email address here:

    Related Posts:

  • Develop Ruby Applications Using SciTE Editor
  • Develop Ruby Applications Using Komodo IDE
  • Programming in Ruby Using SciTE - Windows Issues and Other Tips
  • Develop Ruby Applications Using JEdit Editor
  • EasyEclipse is the Best Packaged Distribution of Eclipse Platform
  • Java on Gentoo
  • Setting Up Rails Development Environment on Ubuntu GNU/Linux

  • August 6, 2006

    Host Your Projects On Internet Using Google Project Hosting

    Filed under: General, Web — tabrez @ 6:21 pm

    After a long time, Google has come up with a (yet another ‘free’ and ‘beta’!) service that interests me very much. I have no use for an online spreadsheet or a photo album application, though Google Notebook was a useful addition. Now comes the impressive free project hosting service for the open source software projects, which adds to many other good free hosting services available, like Sourceforge.net, Tigris.org, Savannah.org etc. The main highlights of Google’s hosting service are: the ease of use/administration(no lengthy forms to be filled, no waiting for the approval etc), source control with customised version of Subversion software and project search functionality. On the face of it, it looks like a service seriously lacking in terms of features, but that is one of the main reasons that makes it stand out from the other project hosting services, in my opinion.

    Many a times, all I had wanted was a source control repository(CVS or Subversion) to host my projects and easy management of which users have the write access to it. The free service provided by cvsdude.com looked to fit the bill well for me initially, but the 2MB limit on the free plan turned out to be very restrictive very soon. Their paid service is too costly for someone needing ‘just a place on the internet to store/share the project files.’ In this context, Google’s free Subversion service(with [expandable] 100MB storage limit) is like an ideal fit for my requirements.

    Creating and administering a project is a total breeze with the Google’s new hosting service. Go to the home page of the service, click the ‘Create a new project’ link, fill out the most essential information about the project(project name, small description, long description, license) and you are done. You can start hosting your project right away, no approvals from Google are needed.

    Create project at Google Project Hosting

    Do remember to note the project name and the url that is created for the project; you will need it to access the project in the future, as no link to the owned projects is present on the google account’s home page once you login into the hosting service. Once the project is created, you need a suitable Subversion client(as needed in almost all the other similar services) to upload the project to the subversion repository. A list of such desktop Subversion clients is available at Tigris website. Once the project files are uploaded to the Subversion repository, others can download them by checking a copy out using a subversion client(instructions available on the project web page) or browse the source code from with in the browser(the interface to view the source code from the browser is not as good as in Sourceforge(ViewCVS), but it gets the job done.

    Browse the source code from the web browserBrowse the source code from the web browser

    Browse the source code from the web browser

    What is lacking in Google’s service, though, is a way to download the project files by the general users. Only the instructions on how to check out the project files anonymously from the Subversion repository are included and the project owners will have to host a tarred or zipped release version of their software at some other server and provide a link to it from the project page(custom links can be added from the administration page).

    Add custom links, google groups, blog url etc from admin interface

    If you want to put any other information related to the project, say some documentation etc(apart from the basic description entered during the project creation), you need to put that elsewhere too(Google may suggest Google Base or Google Pages for this). A link from where to download the binaries/source of the latest release, a little bit of documentation should be good candidates to be added to such a project specific page. It will be highly desirable to have such a web page integrated with the hosting service itself.

    The trend of categorising the resources using tags can be seen in all sort of applications these days, Drupal and MoveableType being two examples. Instead of categorising the hosted projects under only one category(or a few), the project owners can assign a few descriptive tags to their projects with the Google’s hosting service. This will be helpful in searching a project from all the hosted projects. Google calls these tags ‘Labels’ and there is not limit to the number of tags that can be applied to a project. A utility that allows cricket scores to be displayed on a mobile phone developed using J2ME, for example, can be tagged with ‘cricket’, ‘mobile’, ‘J2ME’ labels. I wonder how effective the project search functionality will be if some of the administrators chose to use every possible label that there is to describe the type of their projects.

    Assign labels to the project

    Members can be added to the project by the project owner from the administration page. They need a google account to be a part of the project.

    Adding members to the project

    The only other major feature in Google’s project hosting service(apart from subversion repository) is Issue Tracking. Anyone can submit an issue to a project and the owner can configure what kind of issues are supported by the project.

    Creating and submitting and Issue to the project

    While developers seeking a feature-rich project hosting platform might be unimpressed with the watered-down hosting service provided by Google and may continue to find comfort at places like sourceforge.net and tigris.org, for a large section of open source developers, the features like free source control repository and ease of adminstration should prove to be sufficient. It would be interesting to see what new features Google will come up with for their project hosting service(if they were to ask me, I would vote for service-wide search functionality for the source code) in the near future.


    If you want to receive future posts by email, enter your email address here:

    Related Posts:

  • Why I Switched to Google’s GMail Hosted Domain Service
  • Dreamhost Invitation Codes Give Four Times The Normal Bandwidth and Disk Space
  • Cheapest Web Hosting at $1.92/month With Dreamhost
  • How I Upgraded to Wordpress 2.3 on Live Blog With Zero Downtime
  • Maemo SDK VMWare Appliance 0.4 Released With Lot of Goodies
  • I have a Few Jaiku Invites to Give Away
  • Wordpress Plugin and Theme Cheatsheets


  • Copyright (c) 2006, 2007 Tabrez Iqbal.
    Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. Verbatim copying and distribution of this entire article is permitted in any medium without royalty provided this notice is preserved. A copy of the license is included in the section entitled "GNU Free Documentation License".


    Powered by WordPress
    This website is hosted by Dreamhost