[rspec-users] Rails 3.2 initializers not running when running Rspec without Spork

Avi Tzurel avi at kensodev.com
Mon Jun 25 22:49:39 UTC 2012


Problem solved (although I am not sure where the bug is and if it's a bug). 

the initializers folder had modules defined in it (Facebook, Web).
Those modules were not loading with Rails when Rspec was loading the environment and were not defined as modules in the constants.

When I moved those modules to the lib folder (where they should have been in the first place), rspec ran with no problem at all.



-- 
Sincerely, 
Avi Tzurel


English blog: http://www.kensodev.com
Hebrew Blog: http://he.kensodev.com



On Tuesday, June 26, 2012 at 1:30 AM, Avi Tzurel wrote:

> Sure, no problem 
> 
> here's the error message
> https://gist.github.com/2991793
> 
> This is my spec_helper file
> https://gist.github.com/2991803
> 
> The class that is missing is Web which actually does exist in initializers
> https://gist.github.com/2991809
> 
> -- 
> Sincerely, 
> Avi Tzurel
> 
> English blog: http://www.kensodev.com
> Hebrew Blog: http://he.kensodev.com
> 
> 
> 
> On Tuesday, June 26, 2012 at 1:25 AM, David Chelimsky wrote:
> 
> > On Mon, Jun 25, 2012 at 6:07 PM, Avi Tzurel <avi at kensodev.com (mailto:avi at kensodev.com)> wrote:
> > > Hi,
> > > 
> > > We upgraded our app from 3.0.9 to 3.2.5.
> > > Latest Rspec version running of course.
> > > 
> > > When I run rspec command, I get uninitialized constant error.
> > > The constant that Rspec is alerting on is in the initializers class.
> > > 
> > > it seems that Rspec is not running the Rails initializers.
> > > Anyone else had/know this problem?
> > > 
> > > Any info I can give to better pin point the problem?
> > > 
> > > my spec_helper file is just a regular spec_helper out of the box with some
> > > config additions, I removed the entire spork section from there.
> > > 
> > 
> > 
> > Please make helping you easier by posting actual code and actual error messages.
> > 
> > Cheers,
> > David
> > _______________________________________________
> > rspec-users mailing list
> > rspec-users at rubyforge.org (mailto:rspec-users at rubyforge.org)
> > http://rubyforge.org/mailman/listinfo/rspec-users
> > 
> > 
> > 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20120626/a76d755d/attachment.html>


More information about the rspec-users mailing list