Tag Archives: Rails
The Great Database Rewrite
I just discovered the paper The End of an Architectural Era (It’s Time for a Complete Rewrite), about re-designing database software from the ground up. It contains some unsurprising predictions — “the next decade will bring domination by shared-nothing computer … Continue reading
Testing Named Routes in the Rails Console
I finally found out how to do this, from the Rails Routing shortcut by David Black. In the Rails console, do this: include ActionController::UrlWriter default_url_options[:host] = ‘whatever’ Then you can call your named route methods directly from the console.
Basking in the Solr Glow
I am happy to report that AltLaw.org‘s switch to Solr has worked very well. Solr is a RESTful search engine, built on Lucene. The setup was more complicated than just using a search library, but the rewards were worth it. … Continue reading
Why Doesn’t My Rails App Use memcached with cached_model?
Answer: you’re using the latest version of Rails (1.2.3), which slightly changes the syntax of its SQL statements. cached_model relies on a regular expression to match that SQL statement. To fix: Dive into the source of the cached_model gem, find … Continue reading
Get Apache Serving Static Files With Prefixed Mongrel
I decided to run AltLaw.org under a “/v1″ URL prefix. It’s still beta, and the URL structure will likely change in the future. I don’t want to break 160,000 links when that day comes. Fortunately, Mongrel makes this pretty easy … Continue reading
Darcs with Capistrano for Rails
I’ve used Darcs as my only version-control system for a while now. When I got into Rails, I naturally wanted to use Capistrano. Unfortunately, Darcs and Capistrano don’t get along too well. Darcs’ file-based repositories don’t mesh well with Capistrano’s … Continue reading
Apache Proxy for Rails Returns 403 Forbidden
Trying to set up Apache2 as a proxy for mongrel on my new Ruby on Rails server, following the instructions on the mongrel site. I kept getting “403 Forbidden” errors on every request. I found a comment that seemed to … Continue reading
Where Does the XML Go?
Here’s a question that’s been bugging me for a while: what’s the best way to store information that is a mixture of highly- and loosely-structured data? For example, a collection of documents like Project Posner. Certain attributes of each document … Continue reading