Web
Setting Up Development Environment For Grails on Windows Vista/XP
11Just as Ruby on Rails started to get wide publicity in the media for providing a surprisingly productive web application development framework, many people using other web development technologies suddenly started to wonder if their environment is missing something. Some introspection later, while some tried to add more productive features to their favourite technologies, some others went ahead and committed themselves to create a Ruby on Rails like framework for their own favourite programming language or platform. Where frameworks like TurboGears, Django come close to the model of Ruby on Rails and provided an excellent alternative for the Python programmers, one framework that comes the closest, in my opinion, is the Grails framework, and what good news it is for the Groovy and Java guys looking for an alternative way of developing web applications.
While Grails may yet lack the complete feature set and level of support available for the Ruby on Rails framework, it is very much a stable framework now and currently used by many websites in production environment. Below is the procedure to get everything needed to start creating web applications in Groovy using the Grails framework.
- Download and install the latest version of Java SE(currently JDK 6 update 6).
Skip to the next step if you plan to use NetBeans or some other IDE. If you want to work with a text editor and the command prompt, you need to set the following environment variables:
Go to Control Panel -> System -> Advanced System Settings and click the “Environment Variables” button. (Or Control Panel -> System, select the Advanced tab and click the “Environment Variables” button if you are using Windows XP).Add the path to Java bin directory to the system PATH variable.
Add a new system environment variable called JAVA_HOME and set it to the path to your Java installation directory.

For more details, refer to Sun’s instructions on how to install Java SE. - Download and install the latest stable version of the Groovy windows installer(currently 1.5.6).

Make sure that you install Groovy to a path that doesn’t contain any spaces in it; so you need to remember to change the default path in the installer from “C:\Program Files\Groovy” to something like “C:\groovy”. Also make sure that you select the checkboxes to add Groovy’s directories to system environment variables.


For all the other settings, you can just accept the defaults. To confirm that Groovy is installed and all the environment variables are properly set, run the following command in the command prompt:
C:\> groovy -v
Groovy Version: 1.5.6 JVM: 10.0-b22If you get an error instead, carefully check again that the environment variables PATH and GROOVY_HOME are properly set.
- Repeat the similar process with the Grails installer: Download the latest stable version of the Grails installer and run it.

Unlike the Groovy installer, Grails installer doesn’t create any environment variables, so we have to create them manually. Create a new environment variable called GRAILS_HOME and set it to the Grails installation path.

Also add Grails’s bin directory to the PATH system environment variable:
PATH=%JAVA_HOME%\bin;%GROOVY_HOME%\bin;%GRAILS_HOME%\binTo make sure that Grails is installed and the environment variables are set properly, run the following command:
C:\Users\tabrez>grails -vWelcome to Grails 1.0.2 – http://grails.org/
Licensed under Apache Standard Li
Grails home is set to: C:\grails - Now proceed to the next part of this tutorial and create an example “Hello World” web application using Grails framework to validate your Grails installation on Windows operating system.
Setting Up Rails Development Environment on Windows Vista/XP
19There are different ways in which you might want to set up a complete development environment for Ruby on Rails on a Windows machine. I am going to cover how to setup Rails on a Windows machine using Ruby, RubyGems, Rails, Mongrel, MySQL, NetBeans and Subversion as part of the development stack. I will be using Windows Vista as the reference OS but most of the instructions work for Windows XP too.
- Installing Ruby: Download and install the latest final version of the Ruby installer(currently 1.8.6) from the rubyforge.net website: One-Click Ruby Installer for Windows
Leave all the default settings as they are and proceed with the installation wizard. It is important that you install Ruby in a path which doesn’t contain any spaces in it(the path c:\ruby selected in the wizard by default works fine).
After the installation is complete, confirm that the ruby commands are added to the system path. Start the Command Prompt(Start -> Accessories -> Command Prompt) and type the following command:
C:\> ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
C:\> gem -v
0.9.4If you get the “not recognized as an internal or external command” error, add the path to the ruby bin directory(e.g. c:\ruby\bin) to the system PATH environment variable(Control Panel -> System -> Advanced System Settings).
- Updating RubyGems:
The above installer also installs RubyGems package and SciTE editor as part of the “one-click” installation process. Unfortunately though, the installed version of RubyGems may be a bit old(~0.9.4), so run the following command to update it to the latest available version(currently 1.1.1):C:\> gem update ––system
C:\> gem -v
1.1.1Note: Add “-p http://proxy:port” to all gem install commands if you are connecting to the Internet through a proxy.
- Installing Rails:
Now it is time to install the Rails package. Run the following command to install Rails as a ruby gem:C:\> gem install rails
C:\> rails -v
2.1.0In future, whenever you want to update Rails to a newer version, simply run the following command:
C:\> gem update rails
The basic Rails development environment is now installed on your system and you can skip the rest of the post if you are happy with WEBrick as the web server, SQLite as the database server and SciTE as the editor(or your favourite text editor/IDE already installed on your system). The following instructions cover installing an alternate web server called Mongrel; MySQL database server and its GUI tools; NetBeans IDE, Subversion and their integration.
- Installing Mongrel:
Installing the Rails gem also installs the WEBrick web server which is ideally suited for development purposes. Another much recommended web server for Rails development as well as production environment is the Mongrel web server. To install the Mongrel web server, run the following gem command:C:\> gem install mongrel
C:\> gem list mongrel*** LOCAL GEMS ***
mongrel (1.1.5)
After installing Mongrel, Rails automatically starts the Mongrel instead of WEBrick web server when you run the Rails applications in development mode. (Refer to Mongrel documentation to know more about runing Rails applications under Mongrel in production mode.)
- Installing MySQL:
This step covers the installation of MySQL database server and its GUI tools. Skip this step if you want to use some other database server.Download and install the MySQL 5 database server. You can safely accept all the default settings of the installation wizard. After MySQL database server is installed, you need to run its configuration wizard to configure the MySQL installation.
- If you are a Windows XP user, run the configuration wizard directly from Start -> MySQL -> MySQL Server 5.0 -> MySQL Server Instance Config Wizard.
- If you are a Windows Vista user, you first need to patch the configuration wizard before running it. Follow these instructions to patch the MySQL configuration executable using ResHack utility. Once that is done, you can run the configuration wizard from Start -> MySQL -> MySQL Server 5.0 -> MySQL Server Instance Config Wizard.
One important step during the configuration process is to select a root password(you will need to enter it in the database.yml configuration file of your Rails application).
Now download and install the MySQL GUI tools. This step can be skipped if you want to use mysql command line tools or if you prefer other GUI front-ends like HeidiSQL.
- Installing Netbeans:
You can use your favourite text editor or IDE to code your Rails application. Two of the most popular, Free Rails IDEs are NetBeans and Eclipse. NetBeans in particular has shown great improvement in its support for Ruby programming language and the Rails framework. I am going to cover configuring Netbeans for developing applications with Rails, so feel free to skip this step if you want to go with some other IDE(Aptana, IntelliJ IDEA etc.).Go to the download page of Netbeans IDE and download either the “Ruby” version(~29MB) or the “All” version(~219MB). (Ruby version supports only Ruby where as the All version supports Java, C++, etc. in addition to Ruby.)
Install NetBeans. Run it. When creating a new Rails project in NetBeans, remember to select “Ruby” as the default instead of the default “JRuby” and then select Mongrel as the web server.

For more information on developing Ruby on Rails applications using the NetBeans IDE, refer to the following links:
There are many alternative IDEs that you can checkout, like Aptana Studio, Komodo, IntelliJ IDEA, etc.
- Installing Subversion:
Go to the Subversion download page, scroll down to the Windows section and click the “Win32 packages built against Apache 2.2″ link and download and install the ‘basic win32 binaries’ package.

You can now work with the Rails applications stored in subversion repositories. You can also install and use TortoiseSVN which is a GUI subversion client that integrates very well with the Windows Explorer. I couldn’t find a way to integrated it with NetBeans though, so I install the subversion command line version to use with NetBeans even if I have TortoiseSVN installed on my system.
- Configuring Subversion in NetBeans:
Start the NetBeans IDE and go to Versioning -> Subversion -> Checkout. If you see a dialog box as shown in the screenshot below, it means subversion is properly installed and configured on your system. You can enter the repository details in the fields shown by the wizard, checkout a Rails application and work on it from the NetBeans IDE.
(If you see an error instead, then you need to either add the subversion bin directory to the system PATH variable or enter the path in the shown NetBeans configuration window.)
NetBeans has direct support for CVS, Subversion and Mercurial and NetBeans support for Git is currently under development.
Now you can create/checkout rails applications, edit them and run them under Mongrel from within the NetBeans IDE. One crucial item missing from this development environment is an alternative, more powerful automated build tool CruiseControl, which can also be integrated with NetBeans. Perhaps a topic for another post. In the next post I will explain how to create a basic “Hello World” application in Rails using the above development tools.
I have a Few Jaiku Invites to Give Away
85Update 2:Every Jaiku user now has unlimited invites available now. So just ask here and I can send an invite your way(or ask any other Jaiku user you might know).
Update: All gone now. I will let you know if I ever get any more invites for Jaiku.
I have a few Jaiku invites left in my account that I can give away. Send me the email id where I should send the Jaiku invite or leave it here in the comments. I will update the post when I run out of the invites. (If you want a Pownce invite, leave a comment on this post)
Note: Preference to those who are users of Nokia Internet Tablets(N770, N800) and Mauku.
Remember that Jaiku invites are very difficult to find on the Internet. Still if you want to try, here are the other ways to find a Jaiku invite:
- Ask someone(not me!) who is already on Jaiku to request for an invite on the #jaiku channel.
- Google Search
- Google Groups and other forums you are a regular member of.
- No luck on InviteShare or EBay for Jaiku invites ;)
Five More Desktop Blog Editors for GNU/Linux Users
28There were some excellent suggestions about very good blog editors for the GNU/Linux platform provided in the comments section of my previous post Five Desktop Blog Editors for GNU/Linux Users. So much so that I have decided to compile a second list of desktop blog editors for GNU/Linux platform. All the credit goes to those who have commented on my previous posts and I will note the name of each commenter against the suggestion they have had made.
Flock’s Blog Editor
also suggested by Moulinneuf
I was sad for having to missing out Flock’s built-in Blog Poster in my previous list and the main reason for not including it then was that ScribeFire extension works with Flock too and it is in my opinion a more mature product at this time. Flock’s Blog Poster has some unique features though, not found in any other blog editor:
- No need to manually add your blog accounts; just sign into your accounts and Flock will add them automatically!
- Great integration with Flickr, Youtube and other similar web services
- Collect the stuff over a period of time in “Web Clipboard”(another great feature in Flock) and then use it in your blog post by simple dragging and dropping.

Thingamablog
suggested by Mace Moneta
I found Thingamablog to be the most feature rich blog editor for GNU/Linux(it runs on multiple platforms). It shows the preview of a post in true web browser style(completely working on a desktop) and you can pick one of the multiple themes that come with it. I haven’t spent a lot of time with it(but will do in future) but I am guessing that making it support the theme of my original blog should definitely be possible. Now that would be cooler than Windows Live Writer(which has a similar feature) :) The development of this product seems to have resumed recently and a problem I faced with it was solved by its creator over email in no time. I wish it good luck.

JBlogEditor
suggested by Phillip Rhodes
JBlogEditor is written in Java but still boasts of a great interface, unlike Thingamablog or Breezer(according to my taste). Have a look at some of the screenshots.
QTM for KDE Users
suggested by Andrew Min
QTM is a great blog editor for the KDE users but you will be surprised to see how well it runs even on the GNOME desktop. You can’t differentiate it from the other native GNOME applications! You can keep it in either GNOME or KDE panel for quick access.
KBlogger is another blog poster for that sits in KDE panel for quick access.

Bleezer
suggested by Alex Bogak
Couldn’t get Bleezer running on my GNU/Linux system. Shot an email to the creator and still waiting for a response. The feature set described on the website is impressive. Supposedly works with the new Blogger too! Have a look at its website and give it a try if you think you might like it. Let me know if it runs on your JRE. Here is an old screenshot[from http://larryborsato.com/bleezer] to give you an idea about it:

Update:
Bobrik has a very good post(Russian) on the same topic. If you have liked this post, I strongly recommend reading bobrik’s post too.
English Translation (or do your own translation)
Andy suggests logjam. Some screenshots of logjam are here.
Deepest Sender blog editor runs as an extension in Firefox web browser as well as an XUL standalone application. [via oddn1x]
If you want to post to a Blosxom weblog, then GNOME Blosxom is for you. [via gfiles]
End Notes
How big a fan are you of using a product that is no more in active development? Say a product has not been updated for the past 1-2 years, would you still use it? I try not to, even if it has more features than a product that is under active development. Some of the applications mentioned above, and mentioned in my previous post, are no longer under active development, so make your own call about them.
Got any more comments about the above mentioned blog editors?
Five Desktop Blog Editors for GNU/Linux Users
52Ask ten bloggers at random what they use to compose their blog posts and chances are that you might get ten different answers to that. Possible options include integrated WYSIWYG editor provided by the blogging software itself; desktop blog clients for Windows like w.bloggar and Windows Live Writer; Word processors like MS Office/OpenOffice; Web based blog composers like Google Docs; Emacs, web browser extensions, sidebar/desktop widgets and things like that. It’s the “to each his own” philosophy in full flow here.
For the GNU/Linux users though, the options are pretty limited and I am yet to see a full-blown, feature-rich desktop blog editor that could post to most of the popular blogging engines that are out there. But all is not lost when it comes to blogging tools for GNU/Linux; there are quite a few options and all of them fulfill certain blogging needs to near perfection. Below I am going to discuss five different ways to compose your blog posts on the GNU/Linux platform along with their pros and cons.
All of them can be installed using apt-get or aptitude on Debian/Ubuntu based distributions and can be compiled from the sources on others(first check with the package manager of your distribution before compiling from the source).
Five Blogging Editors to Make Blog Posts From the GNU/Linux platform
- GNOME Blog Entry Poster
Blog Entry Poster is all about convenience and efficiency. It lacks in features but if you want to make a quick post about a news item/article/announcement that you have read on the Internet, then this panel applet can make it as fast as any other tool. To use it, install it from your favourite package manager or download and compile it from the source, and then right-click on the GNOME panel, select Add to Panel from the menu and finally select “Blog Entry Poster” from the dialog box. You can configure settings by right-clicking on the “Blog” dropdown button that you can now see on your panel and selecting “Preferences” from the menu. Select the type of your blog engine, enter its web location, enter the user name and password and click the “Look up Blogs” button. It should fetch your blog and show it in the dropdown box to the left side of “Look up Blogs” button. Click the “Close” button to save the settings.
Now whenever you come across an interesting story on the Internet, you can just click the “Blog” button on the panel, give a title to the blog post, enter the contents and hit the “Post Entry” button. You have some very basic formatting available to add links, format to bold and italics etc., but as noted earlier, this is not the tool to use if you are looking for a lot of features. You have to use HTML tags to do all your formatting and you can’t even preview before posting. But I find this to be the quickest way to make a short blog post. (Clicking the “Blog” button in the panel again closes the dropdown window, but the text you have entered is still retained in it. Click it again to see what I talking about. This allows you to edit the blog entry over a long period of time.)

Gnome Blog Home page - Drivel Journal Editor
You will love to make blog posts with Drivel if you are a LiveJournal user. This one has quite a few interesting features for users of all type of blog engines but it has tons of features specifically provided for the LiveJournal bloggers. I haven’t found such a good LiveJournal blog editor even on Windows; it allows you to select a mood, set the music you are currently listening to, set custom security and bunch of other stuff while making a post to LiveJournal. It is a decent blog editor for other blogging software too, including WordPress, Movable Type and Blogger. Definitely worth a test drive.

More information on Drivel - BloGTK Blog Editor
This is a reasonably feature-rich blog editor for the GNOME platform. It supports many popular blogging engines and has good number of formatting option. My personal favourite feature of BloGTK is the ability to create our own custom tags for HTML tags that are not available by default in the BloGTK toolbar/menu. To start posting blog entries, go to Edit -> Accounts and Settings, enter the details about your blog, click OK, go to the File menu and click the Connect menu item. You are now ready to publish to your blog. The main view of BloGTK shows HTML mixed with the content(unlike Drivel that uses WYSISWYG editor) but it supports the preview mode, so no worries there. You can’t use BloGTK with the new Blogger version yet.

More about BloGTK - ScribeFire Firefox Extension
If you are basically looking for at least the basic set of features that one expects from a blog editor and are not put down by the web browser interface, then ScribeFire Firefox extension(previously called Performancing for Firefox or PFF) is an excellent choice for you. It has more features than any of the above mentioned desktop clients, you don’t have to be online to compose blog posts with it just like a desktop blog editor, it has a very clean user interface and installing it is a total snap as you don’t have to worry whether your GNU/Linux distribution packages it or not, or if you have to build something from the source. As it is a Firefox extension, installing it is as easy as going to the ScribeFire extension page and clicking the “Install” button. You can install it in all Firefox compatible web browsers(e.g. Flock). After installation, click its icon in the status bar of the browser and a window will pop-up which covers the lower part of your browser window. You can hide it and re-activate it at will, making small edits to your content while surfing the Internet to collect more information, and, once finished, finally posting it to your blog or saving it as a note locally.

Getting Started with ScribFire Blog Editor - Google Docs as a Blog Editor
The last option I am going to mention is Google Docs. I love its clean interface and use it to keep a lot of content on various topics in separate document files in the draft form. But when I am almost ready to post it to my blog, I take it over to the integrated editor of WordPress and do the final editing/formatting there. Some people though prefer to do all the editing in Google Docs itself and either copy/paste to the blog web editor in the end or post to the blog directly from Google Docs by selecting Publish from the top-right corner and clicking the “Post to Blog” button. Google Docs is a good option if you use it for other editing purposes too, or to post to multiple blogs, but for posting to only one type of blog, there’s no clear advantage in using it over the blog engine’s own WYSIWYG editor.

Google Docs as a Blog Editor
You can install (1), (2) and (3) on Debian/Ubuntu by running the following commands respectively:
sh# sudo aptitude install drivel
sh# sudo aptitude install blogtk
With (4) and (5), you can learn one interface and use it on any platform.
So what else is there to fulfill other blog posting needs of the GNU/Linux users? I will be particularly interested to hear what Blog Editors do the KDE users use – someone had mentioned KBlogger but I don’t know how good or bad it is.
Update 1: Thanks to all those who have commented on this post, here is the summary of all the blog editors that were suggested by you: Five More Desktop Blog Editors for GNU/Linux Users
Update 2: Here are two more posts related to the same topic of GNU/Linux desktop blog editors:
Linux Blogging Sucks (it’s well written, not a rant)
Building The Blog Editor List (all blog editors, including for GNU/Linux)
Recent Comments