If you’re using the excellent jquery json plugin you might run into problems trying to parse json returned from the php function json_encode.
Specifically, when you try to parse the returned json using $.evalJSON you get the javascript error
missing ] after element list
I also had this same problem with the cakephp json component (which I decided to use instead since it would be more portable across php versions than the php5.2+ only json_encode).
The simple fix is this.
Add slashes to your output and surround it with double quotes like this …
$status = json_encode($status);
echo '"'.addslashes($status).'"';
I figured this one out, by examining rails json output that worked just fine with the jquery json plugin.
February 8th, 2009
I ran into this problem trying to figure out how to make sure that styling alternate rows in a table did not become messed up when tablesorter actually sorted the table.
In googling around I figured out that you had to use the zebra widget call in your initial tablesorter contructor. But no one said exactly how to get the zebra widget to apply the alternate row styling.
The simple answer is (more…)
December 10th, 2008
I was trying to find out how the NY Giants did last night, so I could incorporate it into a nice little jibe I was going to hurl at a friend of mine, so I went in and typed “NY Giants” … into the search box, to start the ever familiar process of clicking on links and backing up until I found what I wanted.
Guess what came up?

Its like they read my mind!
Funny, but it illustrates *exactly* why Google is kicking everybody’s ass at search.
They write software that anticipates the needs of its users.
You should be asking yourself if your software, business, employees or personal service does the same.
December 8th, 2008
New release announced
Global queuing
We recently announced that we’ve developed a feature called global queuing. This feature was requested by 37signals. When global queuing is on, Phusion Passenger will load balance all incoming requests into the first available backend process. This is especially useful if you have long-running requests, e.g. requests that perform heavy calculations and can take several seconds to finish.
Fixed compatibility with the latest Rake version and RubyGems version
When compiling Phusion Passenger using the latest Rake, compilation commands are not shown while various warnings are being shown. This has been fixed. Various RubyGems deprecation warnings have also been fixed.
Running background programs from within the Rails app won’t freeze the request
In previous versions of Phusion Passenger, if one executes
system(”sleep 10 &”)
from within the Rails app, then Phusion Passenger won’t finish the request until 10 seconds have gone by. In other words, Phusion Passenger would wait until the background program has finished. This issue is caused by file descriptor leaks, and has been fixed.
Fixed Mac OS X crash
A Mac OS X related crash has been fixed.
Various bug fixes
The title says it all. If you experienced any kind of problems with previous releases, please try this release as the bug may have been fixed.
December 2nd, 2008
I’m a big fan of the Netbeans IDE, because I love the support it provides for Ruby on Rails.
It means that I upgrade my IDE to the latest release (Milestones, Betas etc) as soon as it comes out, but it also means that with every upgrade, I have to physically go and set every … single … option … again.
Sounds painful doesn’t it?
It is.
Luckily , I found a blog post that describes how to solve this problem and import your netbeans settings from version to version.
This is something that needs to be fixed in Netbeans … that and including a word wrap option … and cakephp support … oops … getting carried away there
November 30th, 2008
I’m writing this post because there doesn’t seem to be much instruction about how to search effectively from the url bar or omni-bar as the google folks call it.
The way its supposed to work is that if you type in a keyword for the search engine then the search query and hit enter, the search will execute using the search engine you specified.
so if you type
“amazon.com Art of Rails”
(note the space between amazon.com and the query)
into the omni bar then hit enter, your search will execute on Amazon.com.
To know that you’re doing it right, after typing in the keyword (amazon.com) and space, the url should look something like this
(more…)
September 11th, 2008
Yesterday I awoke to news about Google Chrome … EVERYWHERE.
And being the non-conformist I like to think I am (like everybody else in the universe), I wasn’t even going to give it a look until I stumbled onto this brilliant marketing tool that they had put together. Its a 40 page comic book walking you through the thought process behind why Google Chrome came about, and how it is different from everything on the market already.
What makes this puppy different?
The main philosophical difference between this browser and others is that fact that, instead of running the browser in one memory space, each tab in the browser has its own process.
(more…)
September 3rd, 2008
Its admirable what they’re trying to do, but I installed the software and couldn’t get it to run. (Strange “could not connect” errors)
After screwing around with their rather unhelpful help thread and losing 2 hours of my life I gave up and uninstalled it. Don’t waste your time like I did, until they at least figure out how to make the darned thing work right out the box.
Thats probably why I hadn’t heard about them until a few days ago, and then, entirely by accident.
August 22nd, 2008
From Paul m. Jones
“I don’t recall where I first heard the term BREAD; it stands for “browse, read, edit, add, delete”. That covers more of what common web apps do, including the record listings. It even sounds nicer: “crud” is something icky, but “bread” is warm and fulfilling. That’s why I tend to use the term BREAD instead of CRUD …”
I like BREAD.
August 20th, 2008
Had to write a blog post on this …

Drobo allows you hotswap SATA hard drives in and out of it.
Just pop it open (yes … while its plugged in) and switch out hard drives as you wish. (more…)
August 20th, 2008
If you’re here, you are probably getting an error like this during a gem install on a windows box.
cl -c -nologo -O1 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAV
E_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -
O1 -MD -Zi -DNDEBUG -DVERSION=\”6.4\” -DXS_VERSION=\”6.4\” -IC:\Perl\lib\CO
RE BitVector.c
‘cl’ is not recognized as an internal or external command,
operable program or batch file.
NMAKE : U1077:
Stop.
The fix is easy if you have visual studio or the .NET SDK installed.
If you don’t then either go download Visual Studio Express or the .NET SDK (anyone out of 1.1, 2.0 or 3.5 should do)
Now, do a search on your local machine for ‘cl.exe’ (more…)
August 18th, 2008
Its old but I stumbled onto this just today. Zed Shaw (the creator of that ol’ faithful Ruby server mongrel) is a fan of the Apache Passenger (modrails) guys
I also met the Phusion Passenger guys and holy fucking crap are they on to something. If anyone is going to actually take on Mongrel in the hosting area it’s Passenger. The developers are super cool nice guys (unlike me) and even DHH likes their stuff. He really never liked anything I built, so hopefully those guys get more support. About the only thing keeping them from taking over is that they use forking so a few libraries that keep resources open will have serious problems. They’ll probably have to think up some kind of thing for that soon, but I think most Rails deployments could get pretty far with Passenger. (more…)
August 16th, 2008
I’ve been mucking around with passenger quite a bit these days. I’ve got two staging servers running it for two different projects and another running a production version of one of those projects.
In digging through the documentation I discovered two new command line tools that come included with the 2.0 version of Passenger.
From the documentation
passenger-status
One can inspect Phusion Passenger’s internal status with the tool passenger-status. This tool must typically be run as root. For example:

(more…)
August 15th, 2008
There is absolutely nothing wrong with doing nothing as long as it is done in moderation.
— From Freelance Switch
‘Become More Efficient By Simplifying Your Life‘
August 15th, 2008


David Otton (who I’ve never met) has an interesting take on the old Framework vs. libraries debate, that I identify with.
I went through the same struggle (in my head) months ago. However, after having that internal struggle that David went through, I came out on the side of frameworks.
Why? (more…)
August 12th, 2008
Next Posts
Previous Posts