Do But Don’t Show
My current project is filled with Ajax calls and the front-end is handled mostly by JavaScript. Subsequently, there are times I just want to return 200 without any content. Rails provides a way to do this by:
render :nothing => true
This allows the execution of a method in controller without a render or a view.
Installing Ruby & Rails on Ubuntu 8.04 Hardy Heron
*** I wrote a script that does this. Get it at here. Just make sure you unzip the file and set the permission to execute. ***
This is what I did to get Ruby and Rails working on my new Ubuntu 8.04 LTS. It appears that nothing really changed from previous version. The basic step is to install the Ruby using apt-get and installing the Gem from the source. I learned my lesson NOT to install Ruby from the source on Ubuntu. Just remember that if any gem installation fails, just get the required library using apt-get and get the ‘dev’ version as well. This is the rule of thumb I’ve been following and has worked out well for me.
Step 1: Install Ruby from apt-get.
~$ sudo apt-get install ruby irb ri rdoc ruby1.8-dev libzlib-ruby libyaml-ruby libreadline-ruby libncurses-ruby libcurses-ruby libruby libruby-extras libfcgi-ruby1.8 build-essential libopenssl-ruby libdbm-ruby libdbi-ruby libdbd-sqlite3-ruby sqlite3 libsqlite3-dev libsqlite3-ruby libxml-ruby libxml2-dev
Step 2: Download and install RubyGems
Just download and extract the latest Gem and run following command.
~$ sudo ruby setup.rb
After successful installation, run this to create the link in /usr/bin
~$ sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
Step 3: Install Rails and Gems
~$ sudo gem install rails
~$ sudo gem install sqlite3-ruby mongrel capistrano
Since I don’t use MySQL anymore, it’s really optional. It’s basically same as before, just make sure you are using following command to get everything you need for MySQL.
~$ sudo apt-get install mysql-server mysql-client libdbd-mysql-ruby libmysqlclient15-dev
** UPDATE **
- “libmysqlclient-dev” is now “libmysqlclient15-dev” => I found this out while installing my new server, but it appears that maurizio de magnis already posted the solution in the comments. Thanks!
- “buildessential” is no longer required when installing Ubuntu Server.
Ubuntu 8.04 LTS Released!
I’ve been waiting weeks for this day, the day Hardy Heron is released. The first thing I did this morning was start the download of the CD image. It was a bit tough, but I managed to grab a connection and got the image. I’m writing this post from my Dell Latitude D620 with a fresh install of Ubuntu 8.04 LTS.
Since the servers are still getting clobbered, I can’t get any updates nor install Ruby. Simple ‘apt-get update’ is timing out. I imagine this will be the case for next couple of days. I promise I will post my findings with Ruby and Gems installations.
My Chumby At Work

Matz Presents Ruby 1.9 at Google
Matz’s Talk at Google:
My Virtual Chumby
Great Talk – Zed Shaw
His jokes aren’t always appreciated and it’s really easy to just dismiss him as a jerk. But you can’t dispute the fact that he created the Mongrel and we all benefited from his efforts. Here’s a presentation he made about Mongrel at QCon in London last year.
It’s really informative as well as entertaining. You can also see why he might be bitter at some people in Ruby community.
JRuby 1.1 Released
JRuby is now 1.1 and appears to show healthy development activities. My plan is to completely switch away from MRI at earliest possible opportunity. However, that all depends on the performance of upcoming releases of JRuby.
TextMate Equivalent for Linux?
*** Major Update ***
I created a screencast here: http://www.rubyhead.com/2009/04/24/komodo-edit-textmate-alternative/
Please see my post here: http://www.rubyhead.com/2009/02/20/search-is-over-textmate-equivalent-and-more-for-linux-windows/
*******
I’ve been struggling to find a text editor for Ruby/Rails development on Ubuntu. I even went as far as make gedit look like TextMate. However, it’s just not the same.
The thing that I should’ve done was to look for the best tool, not the best text editor.
It didn’t take much convincing for me to install NetBeans. I’m just glad that all the bitching I did about NetBeans are gone with my lost archive of blog posting from several years back. NetBeans has improved so much since the early days. And no, it’s not just about Java. It supports Ruby and Rails beautifully. It even gave me a glimpse of Intellisense from my days in Microsoft world.
*** Update ***
I now use geany with file browser plugin. Granted it’s not TextMate, but I’m loving it at this time!!! Take a look at it at http://geany.uvena.de and judge for yourself.

