Goodbye Windows, and welcome back Ubuntu my long lost friend. Finally after a year of working with Windows I managed to find some time to get rid of it and install Ubuntu on my work laptop instead. I can’t tell you how much I missed not having apt-get! I am absolutely thrilled to be using Ubuntu again, and with Compiz now a part of Gutsy Gibbon I no longer have OS X envy anymore. Really I don’t, I haven’t touched my eMac in days, mostly due to wasting so much time tweaking Gnome with eye candy that my eyes hurt.
Furthermore, I made the switch because developing Ruby on Rails applications on Windows is such a pain, and most developers know this, so they go out and buy Macs. Well my friends, you can save your dosh and turn your stock standard Dell into a kick arse development environment for Rails. Just check out the screenshot of my desktop below.
I am using Ubuntu Gutsy Gibbon with Compiz and Emerald. I also have AWN installed for the dock functionality. For Ruby on Rails development I am using a tweaked version of Gedit with plugins that provide much of the functionality of Textmate and more. You can also get Gedit to recognise rhtml files, and provide a real terminal for handy access to command line functionality in the bottom pane.
Sadly I have to keep my Windows partition around for Lotus Notes, but for not much longer. The next release of Lotus Notes will provide support for Ubuntu, and is due out around the middle of this year. Only a few more months until I can completely blow away my Windows partition!
I have been searching for a decent IDE for Rails development on Windows. I have tried RadRails (now Aptana), IntelliJ, and JEdit. I was never satisfied with either of those editors, even though I think Eclipse and IntelliJ are excellent for Java development. I almost gave up searching for an IDE and instead revert back to using Emacs. But lo and behold I came across NetBeans.
I tried NetBeans for Java development about 7 years ago, and it was so bad then that I avoided it like the plague, until now. The newest version is NetBeans 6, and it is this version that supports Ruby and Rails development through a plugin.
NetBeans provides code completion (with hints and API documentation), source navigation, syntax highlighting, code folds, JRuby integration, SVN integration, and contextual menu items for rake tasks and generators. You can also start the web server and launch a browser to view your running application. These are just some of the features that I have come across today. Which is enough to keep me productive with my Ruby and Rails development.
The IDE itself looks to have had a face lift, the UI is now a lot cleaner and responsive. Also the IDE is not as bloated as it used to be with what appears to be an all new plugin architecture. I only have the base and ruby plugins installed. Who knows I might install the Java plugin as well, and give it a whirl with some Java development. But for now I think NetBeans will remain primarily as my Ruby and Rails IDE on Windows.
You can use rake to manage rails versions in the vendor/rails directory of your rails project. This is useful for freezing your project to a particular version of rails. This solves a problem that many rails developers faced when their hosting providers upgraded rails on the servers, and subsequently broke all the rails apps running on the servers. Freezing to a specific version of rails means that the hosting providers can upgrade rails on the server without affecting your application.
Use any of the following rake commands to copy a version of rails into your vendor/rails directory.
rake rails:freeze:edge REVISION=100
rake rails:freeze:edge TAG=rel_1-2-1
The last rake command above will copy the local gems version of rails into vendor/rails. Whereas the other commands will checkout a version from the Rails subversion repository.
The above rake commands should be followed with an update as follows.
The Working with Rails site is a neat little app for keeping track of the rails community.