guard-jruby-rspec icon indicating copy to clipboard operation
guard-jruby-rspec copied to clipboard

Not working for Rails specs?

Open christopherslee opened this issue 13 years ago • 8 comments
trafficstars

Hi,

First off, this project is awesome, it's what we've been looking for to make our JRuby on Rails specs faster!

We ran into two issues: 1, the latest gem on rubygems.org is 0.1.3 which has the typo error in it. I see 0.1.4 here but it's not available on rubygems.

Secondly, when we run a rails controller spec, it cannot find ApplicationController. Is there something we're supposed to configure out our side to get the app loaded?

JRuby 1.6.5, Ruby 1.8.7, Rails 3.1

Thanks, Chris

christopherslee avatar Oct 10 '12 17:10 christopherslee

I'll get the new version out as soon as i can (been really busy with other stuff lately). I'm not sure about the ApplicationController thing. Seems like I would have run into that myself, but haven't. Can you create a little example?

jkutner avatar Oct 13 '12 23:10 jkutner

yeah, i'll work on an example to see if i can recreate it myself.

On Sat, Oct 13, 2012 at 6:02 PM, Joe Kutner [email protected]:

I'll get the new version out as soon as i can (been really busy with other stuff lately). I'm not sure about the ApplicationController thing. Seems like I would have run into that myself, but haven't. Can you create a little example?

— Reply to this email directly or view it on GitHubhttps://github.com/jkutner/guard-jruby-rspec/issues/14#issuecomment-9412314.

christopherslee avatar Oct 15 '12 18:10 christopherslee

i'm unable to recreate the error in a brand new rails app, so it must be something with our app. i'll see if i can get into it a little bit more.

christopherslee avatar Oct 24 '12 00:10 christopherslee

Ok, i'll leave this open until you learn more. I pushed 0.1.4.

jkutner avatar Oct 24 '12 00:10 jkutner

Could this be related to #26?

nilbus avatar May 15 '13 18:05 nilbus

I'm having this issue, it only appears when you run the specs multiple times - it tries to require ApplicationController twice and then freaks out

scottillogical avatar Feb 20 '14 15:02 scottillogical

Also, this generally only happens with controller tests

scottillogical avatar Feb 20 '14 18:02 scottillogical

Since JRuby cannot fork, reloading classes is the only way we can load new changes before re-running specs. As of version 1.2.1, this gem uses Rails class reloading and an interface for custom reloaders to help alleviate problems with that.

Are you using guard-jruby-rspec 1.2.1? If so, what version of Rails?

nilbus avatar Feb 20 '14 18:02 nilbus