Forum: RSpec Specs failing when run outside Spork with TypeError: superclass mismatch for class Attribute

Posted by Jakub Arnold (darthdeus)
on 2011-10-31 11:03
(Received via mailing list)
When I run my specs inside spork, they all just pass without any
problems, but once I try to run them without spork, I end up with

     Failure/Error: Unable to find matching line from backtrace
     TypeError:
       superclass mismatch for class Attribute

on each request spec.

Here's a gist with the whole stack trace, request specs &
spec_helper.rb https://gist.github.com/1327141

I'm running Rails 3.1.1 on Ruby 1.9.2
Posted by David Chelimsky (Guest)
on 2011-10-31 15:42
(Received via mailing list)
On Oct 31, 2011, at 4:59 AM, Jakub Arnold wrote:

> spec_helper.rb https://gist.github.com/1327141
>
> I'm running Rails 3.1.1 on Ruby 1.9.2

Hey Jakub,

I started to look at this yesterday but got nowhere, and it's going to 
be a while before I can look at it again. My theory is that there is a 
another Attribute class defined by one of the gems in your app, and due 
to differences in load order, the right one is winning when you use 
spork, but the wrong one is winning when when you don't. Please 
investigate that and report what you find back here.

HTH,
David
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.