Panasonic Youth

Fixing Textmate Test Issues - `blank_slate_method_added': stack level too deep (SystemStackError)

If you are getting long, recursive stack traces like the following when trying to run a test/spec from within Textmate:

[ruby]/opt/local/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/blankslate.rb:84:in blank_slate_method_added': stack level too deep (SystemStackError) from /opt/local/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/blankslate.rb:84:in blank_slate_method_added’ from /Applications/ method_added' from /Applications/ from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in gem_original_require’…[/ruby]

The stack goes on for many more lines, and your tests always work normally outside of textmate. The issue is that textmate includes its own version of builder, which is conflicting with Rails’ version of builder.

The solution is simple: rename Textmate’s builder.rb to, so it doesn’t get loaded anymore. You can find Textmate’s builder at “/Applications/”. Problem solved. See also this support thread with some more detail.