Interesting
Rails 2.2.2 is released!
Even Rails 2.2.2 isn’t always threadsafe. I found this out by running a script with JRuby from the command line. The script loaded the Rails environment and then launched two threads that simply tried to resolve an ActiveRecord class constant. Fireworks (in the form of LoadError) ensued deep inside of const_missing. I’ll post the full example later today.
Tsearch2 is now built into Postgres (as of 8.3). This means you must remove the metadata from your tables, since Postgres now stores it in a separate place.
You do mean Rails 2.2?
November 24, 2008 at 3:42 pm
Ah clear now. Rails 2.2.2 indeed.
November 24, 2008 at 3:44 pm
ActiveSupport’s autoloading is not thread-safe. Make sure you are calling config.threadsafe! which disables it.
November 24, 2008 at 7:16 pm
Thanks Mike, it does seem that autoloading is the problem here. I turned it off (as you suggested) and the problem went away – although I was forced to load every ruby file in my /lib directory by hand. I don’t grok what’s loading the rest of my app classes, but for now it’s a mystery I’m willing to live with :)
November 25, 2008 at 1:10 am