I need to fix a project which uses PostgreSQL. On a fresh Leopard install with postgresql 8.3 installed from ports I ran into this problem:
$ sudo gem install pg
Building native extensions. This could take a while...
ERROR: Error installing ruby-pg:
ERROR: Failed to build gem native extension.
The solution is quite simply. Just make sure pg_config can be found by the gem installer.
$ mdfind pg_config|grep bin|uniq
/opt/local/lib/postgresql83/bin/pg_config
In this case make sure /opt/local/lib/postgresql/bin is available in the path when executing the gem command
$ PATH=/opt/local/lib/postgresql83/bin:$PATH sudo gem install pg
Currently enjoying some vacation in Suriname.
Update: and back again (2009-03-06)
First I tried Typo, then Mephisto and now this blog is running Wordpress. As a Ruby fan I really wanted to use Ruby everywhere, 2 years ago. I’m now at the point where I just want working stuff (kids will do that to you I guess). The migration from Mephisto to Wordpress was very very smooth, thanks to this excellent article. The Mephisto version I was running was producing a Rails error based on some spam message which was posted. I really didn’t want to dig into the error and upgrading to the latest Mephisto was going to be quite a bit of work. All in all the switch to Wordpress took about 2 hours in total, including customizing the theme a bit and making sure the old permalinks kept working. Cool!
I started converting various apps running on mongrel clusters over to Apache + Passenger. One component of our production system is implemented as as mongrel plugin so it kind of sucks tot keep mongrel around just for this part. The reason I’m looking to abandon mongrel is because it requires all sorts of crappy monitoring tools to keep working properly. Luckily Passenger implements a RACK adapter so converting the mongrel plugin to a full blown RACK app should allow us to host it righ inside Passenger as well.
We sold our apartment a few weeks before the credit crunch hit hard, phew! We already purchased a new house (new construction) last year. Last week we had to move out of apartment. Unfortunately the new house is not yet finished. Well it is, but the utility companies still need to their stuff and the municipality needs to finish the roads, in that order. the new location is just 1 block away because we really like Osdorp and wanted to stay in or around Amsterdam.
In the meantime we’ll be moving between my sis and brother-in-law. c’mon waternet, move!
So, we moved and I canceled all our subscriptions at the old address. So I thought, it turns out KPN has /dev/null’d my cancellation request for the fixed line twice in a row. Each time customer relations assured me it would take 5 working days for the request to be processed. I just called them a third time now, because the line was active. The kind lady gave me a reference number for the cancellation order. So, whenever you deal with KPN I think it’s a good idea to ask for the reference number of the case or order.
Earlier in the year we sold our appartement and bought a new house. With 2 kids it was simply not fun anymore in our cosy appartement on the 4th floor. We won’t get the keys of our new house, which is in the final stages of construction, for another month or two. In the meantime we have to make room for the new owners so the next couple of weeks are gonna be extra hectic and very interesting to say the least.
After stearing clear of Apache2 for the last year for all production servers I’m now ready to give it another try, thanks to Phusion’s Passenger. I’ve grown really tired of setting up god scripts for all environments and fighting mongrel’s pidfile suckage.
Far too many times have things failed because of a dead worker in the cluster or some stale or (even worse!) non-existent pidfiles on the system. Mongrel has served well, but it’s time to look for something better.
A typical setup I use is nginx as the front-end server doing all static content while a pack of mongrels is handling the Rails requests through reverse proxy. nginx is also very important for reproxying requests, where content is streamed from another internal server over the front facing servers. In most of the Rails app I’m writing I have to deal with very large files (audio, video) so reproxy is essential if you want to have any sort of performance on a reasonable budget. Since Apache2 lacks reproxy support (AFAIK, please prove me wrong!) I really want to keep nginx as the front-end server and then do the Rails handling with Apache2 + Passenger through reverse proxy.
I’ve come a cross a couple of posts on this very topic.
I’ll be doing some heavy development and testing over the next couple of days with this setup, will post my findings…
After reading about all the trouble folks went through in getting an iPhone I felt super lucky!! Yesterday I phoned the local BelCompany store to see if they were getting any delivered. There seems to be a reservation list so I asked the guy if it still made sense to sign up. He said sure.. I was number 20 on the list (what, only 20 ppl??). Early this morning I got a call saying I was the last one to secure a phone in the from first batch!! Woaw! The T-Mobile activation system was severely overloaded so the only thing I could do is sign a pre-agreement and wait untill tomorrow (12th) to pick it up. If only I was so lucky playing the lotto!. More as soon as I actually have it in physical possession!
Update: Well got the iPhone 2 months ago. Apart from the terrible battery life, dropped calls, horrible 3G reception and Apple’s draconian developer restrictions, a wonderful phone! Time to jailbreak it…
In Rails 2.0.x the end_of_month now properly gives you the end of month e.g. Mon Jun 30 23:59:59 +0200 2008, instead of Mon Jun 30 00:00:00 +0200 2008, which was the case in Rails 1.2.x (see this previous post). Good thing I caught this, since it used to inside the Nota module of Beldienst. We would be paying out the first of each month twice otherwise