I recently switch from a mod_proxy / thin setup to Phusion Passenger and my application started to do the funniest things and the production.log was full with errors related to memcached. It seems, that passengers spawn method “smart” isn’t compatible with memcached. Within seconds on a lightly loaded server the cache gets corrupted big time. […]
Again, the MySQL ruby gem totally annyoed me trying to install it on a fresh Mac OS X 10.5.5 install and MySQL 5.0.67. This time the following command brought it to life: sudo env ARCHFLAGS="-arch i386" gem install mysql — \ –with-mysql-dir=/usr/local/mysql –with-mysql-lib=/usr/local/mysql/lib \ –with-mysql-include=/usr/local/mysql/includesudo env ARCHFLAGS="-arch i386" gem install mysql — \ –with-mysql-dir=/usr/local/mysql –with-mysql-lib=/usr/local/mysql/lib […]
Times in RSS Feeds and the like are formatted as RFC3339 most of the time. You can save yourself from strftime by using Time.now.xmlschemaTime.now.xmlschema
A regular expression to replace all ampersands (&) in a text that are not part of an entity: t = t.gsub(/&(?!#?\w+;)/, ‘&’)t = t.gsub(/&(?!#?\w+;)/, ‘&’) Language is ruby. The regexp feature used is called a negative lookahead.
I use rmagick when it comes to deal with images. I’m not that disappointed like Zed Shaw with rmagick (but Zed is totally right when he points out on page 4: “[…] and is difficult to install (unless your computer is nearly exactly the same as the author’s).”), but when it comes to deal with […]