Git repo failing on submodule in debian

Is your git repository that has at least one submodule fails to clone on your server?

You have a very good chance that the git version on the server wont support submodules. The debian package installer comes with the git 1.4.4, which does not support submodules.

You may have better luck to compile git on your own.

To compile git.. say version 1.5.5

tar xzf git-1.5.5.tar.gz
cd git-1.5.5
sudo make install

You may also want to make sure you have all dependencies

apt-get update
apt-get build-dep git-core

It may be possible that your make may fail because of missing tcl/tk, if that is the case, then:

apt-get install tcl8.4
apt-get install tk8.4

Comments (1)

Look at your PC from Mac

If you have a PC to connect to quickly while you are on Mac, try Remote Desktop Connection; it works quite well for a beta release.


RGhost & Radiant CMS

If you are planning to use RGhost with the Radiant CMS. Do not extract RGhost in to the vendor/plugins. It certainly wont work. The best thing to do would be to make it available as an extension.

These steps may be useful in getting it working:

  1. sudo gem install rghost
  2. cd vendor/extensions
  3. gem unpack rghost
  4. mv rghost-0.7.4/ rghost
  5. cd rghost
  6. mv lib/* .
  7. rmdir lib
  8. mv rghost lib
  9. rm rghost.rb

Finally add the following to rghost_extension.rb

require 'document'
require 'data_grid/data_grid'
class RghostExtension < Radiant::Extension
  version "0.7.4"
  description "RGhost Extension"
  url ""
  def activate
    RubyGhostConfig::GS[:path]=case PLATFORM
      when /darwin/: "/opt/local/bin/gs"
      when /linux|freebsd/: "/usr/bin/gs"
      when /mswin/: "C:\\gs\\bin\\gswin32\\gswin32c.exe"


MySQL Auto-increment Column

Fact: MySQL keeps its auto-increment counter in memory for Innodb table, this gets initialised when the database starts. The number that gets assigned when the database gets loaded in the memory is found by for e.g. in the id column by max(id)+1 or 1 if empty. Each time you add a record with a NULL value for the auto-increment column, this value in the counter is assigned and counter is incremented again by 1. More on How AUTO_INCREMENT Handling Works in InnoDB.

Some one in the #rubyonrails found it as a problem. He/she had removed the record with the biggest value, restarted the database and the id gets recycled. As per the log story, record was removed but only to be found again. Their solution was to keep a counter on a table, set it manually, and all the dance that you have to do with rails when you mess with the id attribute.

In fact, if they had done it properly, i.e. using dependency options in associations; removing the biggest record and its id being recycled should not be a problem at all. But you know its never a programmers’ fault. In the end I suggested him/her to set a flag to the record that it is unusable instead of removing it. But hey, will they listen? No, it is cool to mess with id column.


Google App Engine

Google App Engine


  • Free
  • Scalable
  • Easy to deploy


  • SQL less
  • Python so far
  • Cannot write files
  • external access limited to HTTP and HTTPS

Anyway, looks interesting, with scary code.


Code After Rcov

The report generated by rake spec:rcov is good and helps me drop some old habit that i got from other than ruby languages. Take this method for instance:

48   def status
49     case status_code
50     when 'A'
51       :active
52     when 'Z'
53       :complete
54     else
55       nil
56     end
57   end

The line 54 & 55 were never tested, because the status codes are nothing supposed to be other than A or Z.

Ruby will return nil in any other case anyway, so I rewrote it to:

48   def status
49     case status_code
50     when 'A'
51       :active
52     when 'Z'
53       :complete
54     end
55   end

nice, 100% covered.


find(:last) for what?

find(id), find(:first) and find(:all) is all fine, but why do we ever need find(:last)

It is shocking, that find(:last) patch made to the core without many “+1”.


Nastiness of restful_authentication RSpecs

I use the plugin restful_authentication to handle logged in sessions. It makes modules to include in your controller and also makes specs if you have spec directory. All fine, but I cannot live with one login session for the websites; I need “admin” and “client” area. Each session will be verified against separate models, i.e. Client and User models in this case. The problem was with the spec for these tests that were generated by the plugin.

The generator also creates authenticated test helpers, which in my case lie in their own namespace. so I have:


But the typical spec generated looks like this:

require File.dirname(__FILE__) + '/../spec_helper'

# Be sure to include AuthenticatedTestHelper in spec/spec_helper.rb instead.
# Then, you can remove it from this and the functional test.
include AuthenticatedTestHelper

describe User do

In my case I had to modify it to include from Admin::AuthenticatedTestHelper or Client::AuthenticatedTestHelper as it fits the model.

For no obvious reason, the tests fail. I finally found the problem with the generated spec that included the module

include Client::AuthenticatedTestHelper
describe User do

It includes the AuthenticatedTestHelper outside the describe block. This gets into trouble with another model spec when it is also called AuthenticatedTestHelper but different namespace.

Anyway, the fix is to include with in the describe block, as in:

describe User do
  include Client::AuthenticatedTestHelper


Project, Tasks & Time

Previously at work I used to do lots of Excel this, Excel that work. So I have a thing for Excel and I once built a time sheet for a friend of mine then. It was a simple and flexible task management excel sheet.Oh yea, a testimonial from the user:

Makes my life easy – It records times and dates automatically. Simple and stupid – Easy to use and Allows me to make changes to the auto recorded info. It helps me to fill in our weekly time sheet to say how much time I spent on a task

It is free to download Time log excel sheet & do whatever with it.

About Macros

I suggest you set Excel Macro settings to medium, so on opening the file, it would ask your permission to enable them.  The macro is in fact only there to help you with automatic time logging, add colours and install virus… am only joking.

Update: Download Time logger Excel Sheet from Github.


Wide Monitor

I had problem with my 14″ flat panel, so I had to borrow a 17″ from a friend. It was quite urgent and fixing the broken would take time. He was very kind, to let me keep it this long.

Last week, I had to buy a monitor to be ready for the Mac mini arrival. I decided to go with a DELL 20″ and tried it on my PC. Boy, I got the native 1680×1050 resolution working on my, borrowed-forgotten-owned, GE Force FX 5500 256 MB video adapter. I am having good time with the wider real estate. I am already thinking when the mac mini arrives, I should get a 24″ for it and leave the 20″ for the PC. If you are in the thoughts of upgrading your display, do not settle anything lower than 20″.

#TODO: revisit non-liquid website layouts


« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »