This issue is a little difficult to explain. I'm running on jruby 1.7.10 but this issue has been around for a while. When I get a number of simultaneous requests for a page with a semantic form, I will start seeing this error:
undefined method `custom_namespace' for Formtastic::FormBuilder:Class
This error can be triggered when I go to render an input for the form ( it can happen to any input on the form ).
The problem doesn't happen unless I've enabled threadsafe. This issue wasn't a big deal before but as the site gets more traffic I've been seeing this error occur more regularly.
Officially we don't support jruby (i.e. it's not in our Travis CI build matrix, I don't spend any time thinking about it), but if we can make it work, great, would love your help.
Is it always custom_namespace that's missing?
I'm not in a position to even know where to start in reproducing this with threads and specs or even just browser. Would you be able to help produce a failing spec of any kind? Without a way to reliably reproduce this it's going to be near impossible to fix.
I made a pull request that adds a failing spec. Thanks for taking the time to take a look.
Formtastic has worked well for us the last few years with JRuby. It's only this issue that pops up once in a while and I'm at a loss of how to resolve ( otherwise I would have put the fix in the pull request ).
Closing this issue as it is definitely jruby specific.