This one drove me nuts.
I was compiling various versions of PHP4 on Mac OS X and even though the phpinfo() was saying that it was loading the php.ini at /usr/local/php/php.ini it really wasnt (still haven’t figured out what it was loading).
But after trawling about for a while, I found this excellent forum post that told me how to get my compiled PHP to load the right php.ini
The solution?
compile PHP with these flags
–sysconfdir=/etc –with-config-file-path=/etc –with-config-file-scan-dir=/etc/php.d
substituting the correct folder paths for each of the flags
July 2nd, 2008
There has never been a statue erected to honor a critic.
- Ziglar, Zig
I couldn’t believe that someone would have the gall to actually go on record with grouses as trite as these against the creators of mod_rails … but they did
Basically here are their complaints about Phusion Passenger/mod_rails
- Their product has ‘Enterprise’ in the title
- They shouldn’t be up to version 2.0 already (yes … they actually said that)
- They release FREE products ‘late’ (late being an excruciating 2 weeks)
- They’d like for them them to be more ‘modest’ (like they haven’t heard of DHH)
- The marketing seems too slick and something ‘fishy’ is going on because they’re trying to make money with an Enterprise ready version of Passenger/mod_rails?!?!
- The ‘rails community’ will not embrace mod_rails because of these laughable quibbles … I guess these guys don’t count as part of the ‘rails community’ right?
ridiculous.
PS: Note that the original ‘rant’ appeared on Ruby flow, where it was rightly eviscerated
June 16th, 2008
The kickass developers over at Phusion have released an update to Phusion passenger (or as I prefer to call it … Apache mod rails).
You can see the list of original improvements here

It seems that this particular problem with mod-rails hanging after a few hours and taking down apache with it (I experienced this in an apache deployment that I tried personally … and its a bit scary) was part of the motivation behind the original mod_rails/Passenger Release Candidate. (more…)
June 16th, 2008
Just got bitten by this one in Ruby on Rails.
If you use empty? to check a hash slice that doesn’t exist you get an error, instead of the behavior of nil? which simply reports that it is actually nil …
irb(main):004:0> test = {}
=> {}
irb(main):005:0> test = {'test' => '1'}
=> {"test"=>"1"}
irb(main):006:0> test
=> {"test"=>"1"} (more…)
June 16th, 2008
I ran into this problem after I installed mod-rails on a cent OS server.
To get my changes to take … I kept running
httpd -k graceful
and it kept working until, all of a sudden, it didn’t.
This was the error I got
[XXXX@XXXXXXXXX]# httpd -k graceful
httpd not running, trying to start
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
unable to open logs
argh!
Then I found this marvellous blog posting on how to fix the “Address already in use: make_sock: could not bind to address - Apache - HTTPD Error”
Here is what I did. (click to enlarge)

worked like a charm too.
June 9th, 2008
I just ran into this bug for the first time today.
In it, a select box appears through an element with you’ve positioned over it using a z-index.
As an example take a look at this screenshot
(more…)
June 8th, 2008
I have a Core Duo model and am running windows (w/ bootcamp), so some of this stuff probably doesn’t apply but …
1. The hard drive is painfully slow. When you go to delete something, you can sit there for a good 5 seconds before the delete dialog is gone
2. You can only run an external 2.5 inch hard drive off one particular USB port (the one to the right) … if you put it on any other port, it will not get enough power and be stuck powering up then powering down. Or it will power up and stay fine for a bit, until it suddenly starts experiencing the situation I’ve described.
3. Maximum installable RAM … 2 Gigabytes.
god.
4. While you can get up to 4 hours of power running OS X on the battery … you’ll barely get 2 hours running Windows.
note: This is a late night rant … I love my darling MacBook Pro.
May 25th, 2008
undefined method `rewrite' for "":String
If you get this error, and the error message is pointing you to a “link_to” call or something similar, then you may be using an instance variable that’s called ‘@url’ too.
This blog post did talk about the problem but it seemed limited to models only. I finally discovered that, in my case, I was using ‘@url’ in the controller for the view where I was making the ‘link_to’ call.
Long story short, if you see this error, comb through your code (models, controllers and views) for any variables that are called ‘@url’ and change them.
May 16th, 2008
Dreamhost now supports the use of mod_rails on their shared hosting plans
The Phusion team contacted me with a working test version of Passenger a couple of months ago and since then DreamHost has been helping out with testing and ironing out lingering deployment issues. The Phusion team has been very helpful and responsive throughout the process and I think we will see a lot more great things from them in the future.
Now to the important part… how do you use Passenger on DreamHost?
Briefly, all you do is enable the Ruby on Rails Passenger (mod_rails) option for any existing or new web domain in the DreamHost web control panel. When you then point that domain’s web directory to the public directory of an existing Ruby on Rails application it will work automatically. For more detailed information, check out our Passenger wiki page.
May 14th, 2008
I ran into a “bad system call” error while trying to run Apache2 on cygwin.
I had installed Apache 1.3 and Apache 2 using cyg-apt, but when I went to start the Apache 2 server, I kept getting this error.

(more…)
May 8th, 2008
Insane!

May 3rd, 2008
I was going through my google analytics logs today and I noticed that a lot of folks were coming to my site on Google searches for stuff like ‘print_r + ruby on rails‘.
So I figured I’d write a blog post about it, because I’ve had the same problem.
(more…)
May 1st, 2008
The more I work with Ruby and Ruby on Rails, the more I begin to understand (though not necessarily agree with) a lot of the vitriol that has been aimed at PHP over the years by developers using other more rigorous languages.
A few weeks back I ran into this little speed bump while working with Ruby on Rails, where I was trying to do a multiple assignment like this
Most seasoned Rubyists will be waving their arms around and yelling “NOOOOOO!!!”
But coming from a PHP background this seemed perfectly okay to me.
(more…)
April 29th, 2008
Previous Posts