Making Time#to_date public in Ruby 1.8.6

I just got caught out by an upgrade to Ruby 1.8.6 and an app which I can’t as yet upgrade to Rails 1.2.3. Ruby 1.8.6 (and 1.9) make the Time#to_date and Time#to_datetime methods private so any code which depends on those methods being public will break. The fix is very easy. I just copied the code from the relevant rails changeset and placed it in my environment.rb file: class Time %w(to_date to_datetime).each do |method| public method if private_instance_methods.include?(method) end end Of course, the ideal is to upgrade to 1.2.3, but that’s not on the cards just yet for this particular project. In the meantime, having to add five lines isn’t too much trouble. ...

March 29, 2007

The surviving history of movies

Over the past few weeks I’ve been hooked by Kristin Thompson and David Bordwell’s blog Observations on film art and Film Art. For the film geek in me, the discussions of film history and criticism from an academic perspective are fascinating. Yesterday, Kristin posted an entry responding to A. O. Scott’s claim in the New York Times that: It is now possible to imagine—to expect—that before too long the entire surviving history of movies will be open for browsing and sampling at the click of a mouse for a few PayPal dollars. ...

March 29, 2007

links for 2007-03-28

Writing a Book | English Rules Karl Swedberg and Jonathan Chaffer are working on a book about jquery (tags: book javascript jquery)

March 28, 2007

The Joy of Separation

The thing I probably enjoy most about working with Rails is that it makes it easier to put logic in the right place than not to. To get back in the swing of blogging after a light couple of weeks, I thought it might be useful to run through an example of how that’s worked out for me recently. From time to time I’ve been working on an application that will contain a database of musicians. To be able to add new musicians quickly I’ve been using: ...

March 28, 2007

Graticule and acts_as_geocodable updates

Graticule and acts_as_geocodable, which I wrote about here, has a new release with a couple of updates worthy of note. First up is the addition of new geocoders which provide better coverage of locations outside North America, and second is IP address to co-ordinates conversion similar to that in GeoKit. Brandon has the lowdown, and I’ve updated the Comparison chart on the wiki.

March 27, 2007

links for 2007-03-25

Microformats: Empowering Your Markup for Web 2.0 | Book Details (tags: books microformats)

March 25, 2007

links for 2007-03-24

Lift Web Framework I’ve begun considering what language and/or framework to learn next. I doubt it’ll be Scala, but this does sound interesting. (tags: frameworks lift scala) Dean Edwards: Yet Another JavaScript Library Without Documentation “This library doesn’t do anything interesting like script.aculo.us or jQuery. It only does standards. But it is my belief that if you build on standards in the right way, you can help future-proof your scripted pages.” (tags: base2 dom javascript) Sam Ruby: Which Way Is Up? ...

March 24, 2007

links for 2007-03-24

Guardian Unlimited | These invasive species are ruining the retail ecosystem “Like it or not (and it is something about which most policy makers and economists are in deep denial), weakly regulated markets give free rein to economic invasive species and hence tend towards monopoly.” (tags: economics planning retail sprawl urbanism) Anne Lamott’s amazing grace | Salon Life (tags: annelamott salon)

March 24, 2007

links for 2007-03-23

catapult magazine : Holy Week : A day to remember Another little piece I wrote (tags: byme catapult cino theology) GOOD Magazine - Sterling On Cities Bruce Sterling offers a video looking at Belgrade, and the future of cities. (tags: urbanism)

March 23, 2007

links for 2007-03-22

ongoing · JRuby Servlets Sounds like running ruby apps within a servlet is becoming a possibility, with good results (tags: jruby ruby servley) GeoRSS blog » Blog Archive » Google supports GeoRSS! “GeoRSS, in all its glory, is now supported by Google Maps. Support for KML has been vastly improved too.” (tags: geography georss google maps)

March 22, 2007