Archive for December, 2010

EventMachine Asynchronous HTTP Client – Custom Headers (User-Agent)

December 16th, 2010 | Category: Development,Rails

If you have a need to set custom request headers like User-Agent or Host, here is how you do so via the EM client

http =
  .get(:head => {"User-Agent" => "Custom Agent"})
No comments

iPhone 3g Jailbreak 4.2.1 SpringBoard crash and Linux mount

December 09th, 2010 | Category: iPhone,Linux,Ubuntu

After updating to 4.2.1 and untethered jailbreak via redsn0w on my iPhone 3g, I had two major issues. The first issue has to do with multitasking. The springboard would crash when using the fast switching. This was fixed by changing the following lines in /System/Library/CoreServices/




The next problem was mounting my iPhone in Ubuntu Linux. The error message will contain something about a timeout. If this is happening you probably need to re-pair the device by doing the following via the libimobledevice utils:

idevicepair unpair
idevicepair pair
idevicepair validate

Apache Phusion Passenger: Apache 2 not found

December 06th, 2010 | Category: Development,Linux,Rails

This may be pretty basic, but figured it may be useful to others. According to the passenger docs, it will look for Apache in the $PATH environment variable. So to fix the Apache 2 not found error, you first need to find the install location. A very helpful command is “whereis” that comes standard on most *NIX systems. If you have whereis installed copy/paste the following into the command line

APACHE_PATH=`whereis apache | awk '{ print $2 }'`

That will set APACHE_PATH to the path returned from whereis. Before you continue, please make sure the path was set properly.


If everything looks good, update the $PATH environment variable.


Then check path to ensure it was updated

echo $PATH
No comments