I have three Rails apps on my laptop. Two can runs tests just fine. The third generates this error when I try to run any tests:> /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/ > active_support/dependencies.rb:200:in `const_missing'': > uninitialized constant Test (NameError) > from ./test/unit/../test_helper.rb:5 > from ./test/unit/album_test.rb:1 > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/ > rake_test_loader.rb:5 > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/ > rake_test_loader.rb:5I found this reference on Google, which seems related, but no answer was provided: http://wrath.rubyonrails.org/pipermail/rails/2006-January/009628.html I get the same error whether I run a single test at a time or a full rake set. I''ve checked config files, and all seems OK. I''m *really* pulling my hair out on this. Any help would be appreciated. -- -- Tom Mornini
If you run debian or debian-based distribution like Ubuntu, make sure that you have unit test package installed (libtest-unit-ruby). Kent. On 2/2/06, Tom Mornini <tmornini@infomania.com> wrote:> I have three Rails apps on my laptop. > > Two can runs tests just fine. > > The third generates this error when I try to run any tests: > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/ > > active_support/dependencies.rb:200:in `const_missing'': > > uninitialized constant Test (NameError) > > from ./test/unit/../test_helper.rb:5 > > from ./test/unit/album_test.rb:1 > > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/ > > rake_test_loader.rb:5 > > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/ > > rake_test_loader.rb:5 > > I found this reference on Google, which seems related, but no answer > was provided: > > http://wrath.rubyonrails.org/pipermail/rails/2006-January/009628.html > > I get the same error whether I run a single test at a time or a full > rake set. > > I''ve checked config files, and all seems OK. > > I''m *really* pulling my hair out on this. Any help would be appreciated. > > -- > -- Tom Mornini > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Thanks, Kent. Notice that 2 of 3 apps can run unit tests just fine. :-) -- -- Tom Mornini On Feb 2, 2006, at 10:10 AM, Kent Sibilev wrote:> If you run debian or debian-based distribution like Ubuntu, make sure > that you have unit test package installed (libtest-unit-ruby). > > Kent. > > On 2/2/06, Tom Mornini <tmornini@infomania.com> wrote: >> I have three Rails apps on my laptop. >> >> Two can runs tests just fine. >> >> The third generates this error when I try to run any tests: >> >>> /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/ >>> active_support/dependencies.rb:200:in `const_missing'': >>> uninitialized constant Test (NameError) >>> from ./test/unit/../test_helper.rb:5 >>> from ./test/unit/album_test.rb:1 >>> from /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/ >>> rake_test_loader.rb:5 >>> from /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/ >>> rake_test_loader.rb:5 >> >> I found this reference on Google, which seems related, but no answer >> was provided: >> >> http://wrath.rubyonrails.org/pipermail/rails/2006-January/009628.html >> >> I get the same error whether I run a single test at a time or a full >> rake set. >> >> I''ve checked config files, and all seems OK. >> >> I''m *really* pulling my hair out on this. Any help would be >> appreciated. >> >> -- >> -- Tom Mornini >> >> >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Hey Tom, I faced this same problem recently as well. It turns out that I had a require in app/controllers/application.rb that wasn''t finding the file, and was causing an exception to be thrown. Somehow, this got in the way of loading ''test/unit.'' (Oddly enough, the tests all worked fine on windows. It turns out my bug was related to the fact that filenames on unix are case sensitive, but they aren''t on windows!). I dont think thats the exact same problem with yours, since its failing on a unit test, not a functional test, but it may be a similar type of error. Try running ''rake test_units --trace'' to see if you can find a more useful error message. Maurice On 2/2/06, Tom Mornini <tmornini@infomania.com> wrote:> > Thanks, Kent. > > Notice that 2 of 3 apps can run unit tests just fine. :-) > > -- > -- Tom Mornini > > > On Feb 2, 2006, at 10:10 AM, Kent Sibilev wrote: > > > If you run debian or debian-based distribution like Ubuntu, make sure > > that you have unit test package installed (libtest-unit-ruby). > > > > Kent. > > > > On 2/2/06, Tom Mornini <tmornini@infomania.com> wrote: > >> I have three Rails apps on my laptop. > >> > >> Two can runs tests just fine. > >> > >> The third generates this error when I try to run any tests: > >> > >>> /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/ > >>> active_support/dependencies.rb:200:in `const_missing'': > >>> uninitialized constant Test (NameError) > >>> from ./test/unit/../test_helper.rb:5 > >>> from ./test/unit/album_test.rb:1 > >>> from /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/ > >>> rake_test_loader.rb:5 > >>> from /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/ > >>> rake_test_loader.rb:5 > >> > >> I found this reference on Google, which seems related, but no answer > >> was provided: > >> > >> http://wrath.rubyonrails.org/pipermail/rails/2006-January/009628.html > >> > >> I get the same error whether I run a single test at a time or a full > >> rake set. > >> > >> I''ve checked config files, and all seems OK. > >> > >> I''m *really* pulling my hair out on this. Any help would be > >> appreciated. > >> > >> -- > >> -- Tom Mornini > >> > >> > >> _______________________________________________ > >> Rails mailing list > >> Rails@lists.rubyonrails.org > >> http://lists.rubyonrails.org/mailman/listinfo/rails > >> > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060202/3327e553/attachment.html
Thank you *so* much. That was *exactly* the problem. Weird error message, that! -- -- Tom Mornini On Feb 2, 2006, at 11:34 AM, Maurice Codik wrote:> Hey Tom, > > I faced this same problem recently as well. It turns out that I had > a require in app/controllers/application.rb that wasn''t finding the > file, and was causing an exception to be thrown. Somehow, this got > in the way of loading ''test/unit.'' (Oddly enough, the tests all > worked fine on windows. It turns out my bug was related to the fact > that filenames on unix are case sensitive, but they aren''t on > windows!). > > I dont think thats the exact same problem with yours, since its > failing on a unit test, not a functional test, but it may be a > similar type of error. > > Try running ''rake test_units --trace'' to see if you can find a more > useful error message. > > Maurice > > On 2/2/06, Tom Mornini <tmornini@infomania.com> wrote: > Thanks, Kent. > > Notice that 2 of 3 apps can run unit tests just fine. :-) > > -- > -- Tom Mornini > > > On Feb 2, 2006, at 10:10 AM, Kent Sibilev wrote: > > > If you run debian or debian-based distribution like Ubuntu, make > sure > > that you have unit test package installed (libtest-unit-ruby). > > > > Kent. > > > > On 2/2/06, Tom Mornini <tmornini@infomania.com> wrote: > >> I have three Rails apps on my laptop. > >> > >> Two can runs tests just fine. > >> > >> The third generates this error when I try to run any tests: > >> > >>> /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/ > >>> active_support/dependencies.rb:200:in `const_missing'': > >>> uninitialized constant Test (NameError) > >>> from ./test/unit/../test_helper.rb:5 > >>> from ./test/unit/album_test.rb:1 > >>> from /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/ > rake/ > >>> rake_test_loader.rb:5 > >>> from /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/ > rake/ > >>> rake_test_loader.rb:5 > >> > >> I found this reference on Google, which seems related, but no > answer > >> was provided: > >> > >> http://wrath.rubyonrails.org/pipermail/rails/2006-January/ > 009628.html > >> > >> I get the same error whether I run a single test at a time or a > full > >> rake set. > >> > >> I''ve checked config files, and all seems OK. > >> > >> I''m *really* pulling my hair out on this. Any help would be > >> appreciated. > >> > >> -- > >> -- Tom Mornini > >> > >> > >> _______________________________________________ > >> Rails mailing list > >> Rails@lists.rubyonrails.org > >> http://lists.rubyonrails.org/mailman/listinfo/rails > >> > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060203/8be6b67d/attachment-0001.html