Symlinked hosts file in OS X Lion doesn’t work for some domains

August 3rd, 2011 § Comments Off § permalink

I have absolutely no idea how and why this works, or why it’s a problem in the first place. Just posting it here so it might help someone.

Prior to upgrading to Lion, my /etc/hosts file was a symlink to the actual file I put in my Dropbox sync folder (so I get a backup), and it was working perfectly. One of the entries I have in my hosts file is
and Snow Leopard faithfully resolved that to

After the upgrade to Lion, it appeared that OS X would now first query the DNS server before it consults the hosts file. See below -
/etc $ ping
PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=238 time=282.977 ms

What’s weird about it is, it works for some domains and doesn’t work for some. I’ve tried out suggestions to rearrange the position of the entry, or to change to only one entry per line, but none of them worked.

So guess what fixed that? I deleted the symlink and put the actual file in /etc. Ta-da, that fixed it!
/etc $ ping
PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=64 time=0.051 ms

Ruby 1.9.3 Preview 1 available now

August 2nd, 2011 § Comments Off § permalink

Yuki “Yugui” Sonada has just announced the availability of Ruby 1.9.3 Preview 1.

I have just released Ruby 1.9.3 preview1. This is the first preview of Ruby 1.9.3 releases.

I know there are still minor known issues on 1.9.3 but I believe it will be fixed before the release of Ruby 1.9.3-p0. Let’s try it out. If you have any trouble on it, please let us know it.

If you use RVM (who wouldn’t? And if you are on Mac or Linux and you are not using it, you seriously should get it now), you can get it with the following -

rvm get head
rvm reload
rvm install 1.9.3-preview1
rvm use 1.9.3

I ran into a problem tcltklib.bundle not linking the right libiconv library, installation failed with the following error:

linking shared-object tcltklib.bundle
ld: in /usr/local/lib/libiconv.2.dylib, missing required architecture x86_64 in file for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [../../.ext/x86_64-darwin11.0.0/tcltklib.bundle] Error 1
make[1]: *** [ext/tk/all] Error 2
make: *** [build-ext] Error 2

That problem persisted even without I explicitly set rvm to use –with-iconv-dir and point to the one shipped with OSX, but tcltklib would still try to get the one in /usr/local/lib. I fixed this by symlinking the one in /usr/local/lib to /usr/lib.

rm /usr/local/lib/libiconv.2.dylib
ln -s /usr/lib/libiconv.2.dylib /usr/local/lib/libiconv.2.dylib

Enabling ~/Library in Finder

July 29th, 2011 § Comments Off § permalink

By default, Lion hides the ~/Library folder in Finder. To show it, simply open a terminal and type the following -

sudo chflags nohidden ~/Library

Rediscovering Google Chrome

July 24th, 2011 § Comments Off § permalink

A funny side effect of being active on Google plus is it made me a heavy Google Chrome user.

Make no mistake. I’m a Google fanboy. Period. I started using Google Chrome on the very first day it was released (that must be years ago). And although I was very impressed with the clean interface and the fast start up time (Firefox, before version 4 was infamous of its long start up time) initially, I never made Chrome my daily browser, primarily because I couldn’t live without Tree Style Tab and Firebug. And in the early days, we didn’t even have AdBlock on Chrome.

Thanks to the lack of Google Apps account support, running multiple browsers became a necessity to be on Google Plus (it’s really no fun in logging in and out different accounts on the same browser). So I fired up Chrome (I always had both Chrome Beta and Chrome Canary installed on my laptop, but they were there just because I occasionally needed to fix Chrome-specific JS / CSS bugs), and decided to force myself to use it without resorting to Firefox.

And what can I say about Google Chrome today? It’s pure awesome. The new multi-profile (available on Beta and Dev channels) makes switching accounts a breeze. I don’t need a Tree Style Tab equivalent on Chrome, because if you need it just to have many tabs open, you probably are using the web wrong!

Download (Canary channel).

Hello world again

June 30th, 2011 § Comments Off § permalink

Back to blogging, after having stopped for years. WordPress has evolved so much, how not surprising that it doesn’t have even a single serious competitor. Or is blogging a field nobody wants to compete in anymore?

Hello world!

June 30th, 2011 § 1 comment § permalink

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

  • @keewooi

    • Oops .. it looks like Twitter is down