running rails 2.3, I do a rake test:units. No tests only default stuff. I get: You have a nil object when you didn''t expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] Any ideas? I have no real tests yet. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
2010/1/21 Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> running rails 2.3, I do a rake test:units. No tests only default > stuff. I get: > > You have a nil object when you didn''t expect it! > You might have expected an instance of ActiveRecord::Base. > The error occurred while evaluating nil.[]Show us the code that failed (around the line generating the error). But first look at it try and see why something that is expected to be one of your model objects is acutally nil. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No idea, here is the trace. ** Invoke test:units (first_time) ** Invoke db:test:prepare (first_time) ** Invoke db:abort_if_pending_migrations (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:bort_if_pending_migrtions ** Execute db:test:prepre ** Invoke db:test:lod (first_time) ** Invoke db:test:purge (first_time) ** Invoke environment ** Execute db:test:purge rake aborted! You have a nil object when you didn''t expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] F:/BACKUP/Backup/Web_apps_svn_working/writersonly/R2/vendor/rails/railties/lib/tasks/databases.rake:360 F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'' F:/BACKUP/Backup/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'' F:/BACKUP/Backup/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'' F:/BACKUP/Backup/Web_apps_svn_working/writersonly/R2/vendor/rails/railties/lib/tasks/databases.rake:391 F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'' F:/BACKUP/Backup/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'' F:/BACKUP/Backup/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'' F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 F:/BACKUP/Backup/ruby/bin/rake:19:in `load'' F:/BACKUP/Backup/ruby/bin/rake:19 On Thu, Jan 21, 2010 at 2:07 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> 2010/1/21 Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > > running rails 2.3, I do a rake test:units. No tests only default > > stuff. I get: > > > > You have a nil object when you didn''t expect it! > > You might have expected an instance of ActiveRecord::Base. > > The error occurred while evaluating nil.[] > > Show us the code that failed (around the line generating the error). > But first look at it try and see why something that is expected to be > one of your model objects is acutally nil. > > Colin > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
2010/1/21 Chris Habgood <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> No idea, here is the trace. > ** Invoke test:units (first_time) > ** Invoke db:test:prepare (first_time) > ** Invoke db:abort_if_pending_migrations (first_time) > ** Invoke environment (first_time) > ** Execute environment > ** Execute db:bort_if_pending_migrtions > ** Execute db:test:prepre > ** Invoke db:test:lod (first_time) > ** Invoke db:test:purge (first_time) > ** Invoke environment > ** Execute db:test:purge > rake aborted! > You have a nil object when you didn''t expect it! > You might have expected an instance of ActiveRecord::Base. > The error occurred while evaluating nil.[]I presume you have created the test database? Otherwise I don''t know, I assumed from your initial post that it was failing in your code but i see not. Can anyone else help? Colin> F:/BACKUP/Backup/Web_apps_svn_working/writersonly/R2/vendor/rails/railties/lib/tasks/databases.rake:360 > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in > `call'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in > `execute'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in > `each'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in > `execute'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in > `invoke_with_call_chain'' > F:/BACKUP/Backup/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in > `invoke_with_call_chain'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in > `invoke_prerequisites'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in > `each'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in > `invoke_prerequisites'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in > `invoke_with_call_chain'' > F:/BACKUP/Backup/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in > `invoke_with_call_chain'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in > `invoke'' > F:/BACKUP/Backup/Web_apps_svn_working/writersonly/R2/vendor/rails/railties/lib/tasks/databases.rake:391 > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in > `call'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in > `execute'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in > `each'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in > `execute'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in > `invoke_with_call_chain'' > F:/BACKUP/Backup/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in > `invoke_with_call_chain'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in > `invoke_prerequisites'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in > `each'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in > `invoke_prerequisites'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in > `invoke_with_call_chain'' > F:/BACKUP/Backup/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in > `invoke_with_call_chain'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in > `invoke'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in > `invoke_task'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in > `top_level'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in > `each'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in > `top_level'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in > `standard_exception_handling'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in > `top_level'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in > `run'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in > `standard_exception_handling'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in > `run'' > F:/BACKUP/Backup/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 > F:/BACKUP/Backup/ruby/bin/rake:19:in `load'' > F:/BACKUP/Backup/ruby/bin/rake:19 > > On Thu, Jan 21, 2010 at 2:07 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> >> 2010/1/21 Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: >> > running rails 2.3, I do a rake test:units. No tests only default >> > stuff. I get: >> > >> > You have a nil object when you didn''t expect it! >> > You might have expected an instance of ActiveRecord::Base. >> > The error occurred while evaluating nil.[] >> >> Show us the code that failed (around the line generating the error). >> But first look at it try and see why something that is expected to be >> one of your model objects is acutally nil. >> >> Colin >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> >> > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.