Rake db:test:purge , nil.object detected


#1

Hii have problem running rake db:test:purge ( my test database is
empty ) : adter running with trace it shouts :

matthew:rails code pietia$ rake db:test:purge --trace
(in /Users/pietia/Documents/praca/projekty/silk/rails code)
** Invoke db:test:purge (first_time)
** Invoke environment (first_time)
** Execute 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.[]
/Users/pietia/Documents/praca/projekty/silk/rails code/vendor/rails/
railties/lib/tasks/databases.rake:347
/Users/pietia/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake.rb:617:in call' /Users/pietia/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake.rb:617:inexecute’
/Users/pietia/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake.rb:612:in each' /Users/pietia/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake.rb:612:inexecute’
/Users/pietia/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake.rb:578:in
invoke_with_call_chain' /opt/local/lib/ruby/1.8/monitor.rb:242:insynchronize’
/Users/pietia/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake.rb:571:in
invoke_with_call_chain' /Users/pietia/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake.rb:564:ininvoke’
/Users/pietia/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake.rb:2027:in
invoke_task' /Users/pietia/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake.rb:2005:intop_level’
/Users/pietia/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in each' /Users/pietia/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake.rb:2005:intop_level’
/Users/pietia/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in
standard_exception_handling' /Users/pietia/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake.rb:1999:intop_level’
/Users/pietia/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake.rb:1977:in run' /Users/pietia/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake.rb:2044:instandard_exception_handling’
/Users/pietia/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in run' /Users/pietia/.gem/ruby/1.8/gems/rake-0.8.4/bin/rake:31 /opt/local/bin/rake:19:inload’
/opt/local/bin/rake:19


#2

Problem solved , it was problem in my database.yml file