Skip to main content

Posts

Ruby on Rails with Postgresql on Debian/Ubuntu

Based on the information scattered here and there, if you want to use postgresql with Ruby on Rails on Debian/Ubuntu, you can use 2 approaches: The first approach based on various places and experiment is 1. Set adapter of database.yml to postgresql. 2. Install postgresql-server-dev-?.? (?.? = 8.3 in Debian Lenny). 3. Install the pg gem with "gem install pg" The above approach has been tested. Another approach based on http://www.williamchu.com/blog/?p=9 1. Set adapter of database.yml to jdbcpostgresql 2. Install the activerecord-jdbcpostgresql-adapter with "gem install activerecord-jdbcpostgresql-adapter jdbc-postgres " I don't bother to test this approach since it's using jdbc, which means another layer of complexity. But this might be useful if you use JRuby. In addition, this approach should work on other linux distro.

Installing ruby 1.9 from source on debian/ubuntu, the rubygem/zlib/ssl problem

Since I noticed some people experienced the same problem, and the solution to this is scattered into multiple posts/comments, I'll just integrate it here. Basically if you install ruby 1.9 (or probably other versions) from source in Debian based distribution (like Ubuntu), the zlib part of Ruby won't be installed. This problem will reveal itself when you want to install Rubygems, for example Rails for Ruby on Rails. The solution is: 1. Clean up all that failed compiled files in the directory where you run "make". Just to be on the safe side. 2. Install zlib headers (zlib1g-dev in Debian Lenny) using your distro package manager. 2a. While you're at it, also install ssl headers (libssl-dev in Debian Lenny) using your distro package manager. 3. Run "./configure", "make", "make install". 4. Run "./configure", "make", "make install" again. It should work then. In my understanding, the problem is caused by Ruby...

My employees are holding a strike, yay!

Today almost 80% of my employees are holding a strike. The cause was pretty simple, one old employee who had a pretty bad track record was.. verbally disciplined. For whatever reason, he couldn't accept that reprimand so he told his work friends. Now, some of those friends were talented provocators (really. they were pretty good..) . I had awared of them since years ago but they behave well enough so... They coordinate a strike bringing almost 80% of them. The detail is rather sketchy since I wasn't present when the incidence happen. I'll update later. But one thing for sure, I now have a reasonable basis to fire those provocators. Yay! But now I must deal with some future consequences... *sigh*

The boiling frog: Internet censorship (Fitna) in Indonesia.

Have you heard the story of boiling frog? Taken from wikipedia: "The boiling frog story states that a frog can be boiled alive if the water is heated slowly enough — it is said that if a frog is placed in boiling water, it will jump out, but if it is placed in cold water that is slowly heated, it will never jump out." This blog told me about a decision of a major ISP in Indonesia to censor the controversial fitna film. Regardless of whether that movie deserved to be ban or not, I fear that this censorship is the beginning of boiling frog phenomenon. The justification for the next censorships will be more and more ridiculous that it won't take too long for Indonesia returning to a police state again.. And I do think that the censorship decision is ridiculous. Yes it is probably important to ban this movie in Europe where a majority or people in power are not moslem, because the hatred towards moslem induced by that film put many minority moslems in trouble. But in Ind...

How guilty is he?

Consider a ..hypothetical case. Due to a certain fuck up, a large national corporation used to pay P's electricity bill. Being a good honest individual he reported their mistake to their office, and offered them a payment equal to the amount they paid. They said they would contact him again. The following month they paid his electricity bill again. He reported this incident again to them, while checking whether the person he talked to have the authority to act on the corporation behalf. This time, they did send someone to him. He paid them although he only received their proof of payment as receipt, which wasn't enough evidence that the money would be properly received by the corporation. ..as you can guess, they paid his bill again on the following month. He called them again. They say they would get to him again. He waited and waited for months but no one ever come anymore. Meanwhile, he was getting so busy he totally forgot. When he finally remembered again, he didn't ...

How to move a car with parking break on

These last days I experienced a truly ironic event.. I'll probably post about it one day. --- Anyway, today an asshole parked in front of my employees' pool car. She (I believe a she based on items inside the car) positioned it in such a way that the pool car can't get out. What pissed me was that she pulled her parking brake thus the car can't be pushed from outside. My employees must wait for her car key to move her car from inside. The problem was, they didn't know where she was and she didn't bother to tell parking attendants her whereabouts. My employees were getting restless waiting for her. They began kicking her car's tire and knocked the car to light up it's alarm, so that she can hear it and come to the car. Unfortunately, the car didn't seem to have any alarm. The night was coming. They are getting more restless while still no sign of her at all. They really can't wait no longer. Then, you know what? Together they lifted her car and mo...