Crappy Development Environments


Recently I've been working on a large-ish project where all of the UI is written in Javascript. That, in itself, is great. The environments (the browsers) are crappy crappy for development though. Sure, there are Firefox extensions etc etc to help, but it's Just Not Great. Javascript = Great. Ajax = Yay. Browsers = Bah.

Over the weekend I spent all sorts of time getting a simple Rails application running with Apache and mod_fcgid. When I gave up and tried making it work with lighttpd I got server error galore. Yay. What was wrong? My fastcgi? The fcgi Ruby extension? My ruby installation is in /pkg/packages/ruby-1.8.4 or some such and the gem tool couldn't find its own libraries after being installed there. Maybe something similar for something else? I have no idea, I got no error messages anywhere. Ruby = Great. Rails = Very nice1. Ruby Gems = It sure is no FastCGI/lighttpd/etc = Loosely coupled? No mister, you have some way to go.

Sorry, there's not really any point to this. :-) It's fun to get out of the Apache/mod_perl/Perl environment once in a while, but it sure can be frustrating too.

On a lighter note: I've been installing and upgrading MySQL a bunch of times in various odd configurations over the last month and the MySQL installation tools are getting Really Slick. Very nice! Now if only the RPM packages would be nicer about not needing to de-install old versions of the libraries or if they could always come with old compat versions...

Recent favorites: mysqld_multi and the mysql instance manager

1 For the right applications etc etc.


You usually don't have to install the shared library packages if you just want to update the client and server. Unfortunately some distributions include the shared libs along with the server package, so updating it would break the library dependencies. For these, we provide a separate "shared-compat" RPM, that contains the older shared librararies, too. Have you tried this one yet?

Hi Lenz, thanks for stopping by.

Yes, the compat packages does get me most of the way -- when they are provided. I see they are for 5.0.19, thanks! Earlier they haven't been consistently provided.

I sadly don't have a box right now that needs upgrading, so I can't reproduce exactly what gets in the way. If I recall correctly, then it's usually something like upgrading mysql-shared will make the old libmysqlclient go away. Some system RPM depends on that old libmysqlclient and won't let you upgrade then.

It's easy enough to force it through and then install the compat package afterwards to keep everything working, but it'd be simpler if the old libmysqlclient's were just included in the MySQL-shared package.

I wonder if it's an RPM problem that it can't figure out that the old file just moved from one package to another -- or maybe it'd work if I just installed the compat package at the same time I upgrade MySQL-shared.

The main trouble has usually been that the compat package wasn't available (or was available only for an older version which would conflict in some way with the newer version of the other packages etc etc). I'm glad that has been sorted for 5.0.19; I hope it will be for future versions too! :-)

- ask

If you're a Template Toolkit guy, you really need to check out Jemplate. It will replace pages of tedious DOM manipulation commands with just a few lines. And for a bonus you get to use the same TT-style templates for both HTML and JS pages.

As for Apache + FCGI, I've never had any luck wrestling with it. I use lighttpd + fastcgi for RoR development and it's quite blissful. Much faster than the WebBrick stack.

I don't know how you had it configured (looks like you're maybe using netbsd's pkg system?), but I used DarwinPorts on OSX 10.4 to build fastcgi, lighty and installed the FCGI gem, and everything works well. Here's the relevant bit of my lighttpd.conf file (perhaps it's useful to you?) for a rails vhost...

$HTTP["host"] =~ "courseware" {
server.document-root = "/Users/jewart/Code/courseware/public/"
server.error-handler-404 = "/dispatch.fcgi"
server.indexfiles = ( "dispatch.fcgi")
server.errorlog = "/Users/jewart/Code/courseware/log/lighttpd-error.log"
fastcgi.server = ( ".fcgi" =>
( "localhost" =>
( "socket" => "/tmp/courseware.socket",
"min-procs" => 1,
"max-procs" => 2,
"bin-path" => "/Users/jewart/Code/courseware/public/dispatch.fcgi",
"bin-environment" => ( "RAILS_ENV" => "development" )


Leave a comment

About this Entry

This page contains a single entry by Ask Bjørn Hansen published on March 21, 2006 11:45 PM.

Find recent content on the main index or look in the archives to find all content.


OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.33-en
/* bf */