Avi Tzurel
2012-Jun-25 22:07 UTC
[rspec-users] Rails 3.2 initializers not running when running Rspec without Spork
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. Thanks you in advance for any assistance. -- Sincerely, Avi Tzurel English blog: http://www.kensodev.com Hebrew Blog: http://he.kensodev.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20120626/6d98ed95/attachment.html>
David Chelimsky
2012-Jun-25 22:25 UTC
[rspec-users] Rails 3.2 initializers not running when running Rspec without Spork
On Mon, Jun 25, 2012 at 6:07 PM, Avi Tzurel <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
Avi Tzurel
2012-Jun-25 22:30 UTC
[rspec-users] Rails 3.2 initializers not running when running Rspec without Spork
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/011ea25e/attachment.html>
Avi Tzurel
2012-Jun-25 22:49 UTC
[rspec-users] Rails 3.2 initializers not running when running Rspec without Spork
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>
David Chelimsky
2012-Jun-26 00:33 UTC
[rspec-users] Rails 3.2 initializers not running when running Rspec without Spork
On Mon, Jun 25, 2012 at 6:49 PM, Avi Tzurel <avi at kensodev.com> wrote:> 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.Glad you fixed the problem. In terms of the diff behavior, this is just a guess, but it sounds like between 3.0.9 and 3.2.5 Rails stopped including config/initializers in the autoload paths in the test environment. If that''s the case, and you want them loaded, you can always do it yourself in config/environments/test.rb. Cheers, David> > > > -- > 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> 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 > http://rubyforge.org/mailman/listinfo/rspec-users > > > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users