If you're trying to develop Rails in Win32 and using UltraSphinx for full-text searching, drop this into ultrasphinx.rb, otherwise indexing won't work. You'll get an obscure error "FATAL: config file ''C:/rails/rails_apps/posterous/config/ultrasphinx/development.conf'' does not exist or is not readable" after running rake ultrasphinx:index.
Here's the code snippet to drop into line 157 of ultrasphinx.rake: if RUBY_PLATFORM =~ /(:?mswin|mingw)/cmd = "indexer --config #{Ultrasphinx::CONF_PATH}"
else
cmd = "indexer --config '#{Ultrasphinx::CONF_PATH}'"
end There's another one in there around line 53 to start the server too. Ruby double-quotes the configuration path on win32 which results in the Sphinx indexer throwing that error about the config file being unreadable. It's there, alright, it just gets confused by the extra quotes. Basically as of Monday I won't be developing on Win32 anymore (thankfully, my Macbook Pro arrives). It always makes sense to stick closely with what works. I can't even imagine how much time I've spent debugging obscure Rails problems on the Win32 platform. My friend Mark and I had to develop on Solaris before, and we ran into all sorts of issues where Solaris is just slightly different from Linux, but different enough to have to spend hours trying to figure out what's happening. Don't let this happen to you. Friends don't let friends drive drunk or develop Rails applications on Windows.