22
09
2007
Let’s say you’re using Rails with PostgreSQL and the TSearch2 built-in full text search engine.
Did you notice that every time you run rake test, that depends on db:test:prepare, which depends on db:test:clone, which depends on db:test:purge, which drops the database and creates it again?
Along with your dropped database goes the TSearch2 functions that wrap the C libraries that do the actual work. So, in effect, you no longer have TSearch2 installed. (”Uh… I kinda needed those…”) Presumably if you have tests that exercise search functionality, they will always fail because the TSearch2 functions are gone by the time the tests run.
Read the rest of this entry »
Comments : 2 Comments »
Categories : databases, postgresql, ruby on rails
2
08
2007
From what I’ve seen, Rails’ weakest features lie in the way it prepares the test database and test data, and Ruby’s Test::Unit isn’t much better than the awful but ubuiquitous JUnit that Java developers are accustomed to. I set out this week to impose my preferences on Rails in this area, and that took some effort. Here’s what I did.
Read the rest of this entry »
Comments : 5 Comments »
Categories : architecture, databases, java, postgresql, ruby, ruby on rails, sql, testing
2
08
2007
For the last few days I’ve been struggling to bend Rails to my will regarding the proper way to assure data consistency. Today I made some progress. This builds upon some research I did a few months ago, and hopefully this is a more or less complete solution to the problem of making Rails work the way I want it to regarding test databases.
Read the rest of this entry »
Comments : 23 Comments »
Categories : architecture, databases, postgresql, ruby, ruby on rails, sql
27
07
2007
Last year I was doing mobile development and there was interesting Linux-as-smartphone-OS stuff going on. Now I’m doing Ruby on Rails development and there’s interesting server grid stuff going on. Here’s what I’m looking forward to finding out more about (all of these are things I’ve been watching or directly researching already):
Read the rest of this entry »
Comments : 1 Comment »
Categories : Linux, databases, gfs, nfs, oracle, postgresql, raid, ruby, ruby on rails, servers, tools, vmware, xen, zfs
15
07
2007
Once upon a time, before Google pwn3d internet search, there were several competing definitions for full text search. Altavista more or less gave you results matching the exact strings you gave it, but in a crazy order that made it painful to use. Excite (my favorite back then) used a dictionary to achieve stemming and synonym matches: searching for ‘dogs’ would also match documents that contained ‘canines’ or ‘dog’. Then Google blew them all away, and established a dominant set of expectations for how text search behaves.
I forgot about this, which is why I’m frustrated by the almost ridiculous complexity of the major server-side text search engines available right now. But it makes sense, once you learn what the options are.
Read the rest of this entry »
Comments : 1 Comment »
Categories : XML, architecture, databases, postgresql, ruby on rails, sql