Weird Rails | Rake | Gems Error

I'm seeing the strangest error this morning. Does the following stack trace mean anything to anyone?

Thanks.

James Edward Gray II

$ rake test_units
(in /Users/james/Documents/Contract Jobs/HighGroove/robrady)
/usr/local/bin/ruby -Ilib:test "/usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader.rb" "test/unit/account_test.rb" "test/unit/company_test.rb" "test/unit/contact_test.rb" "test/unit/file_note_test.rb" "test/unit/file_status_test.rb" "test/unit/file_type_test.rb" "test/unit/grade_test.rb" "test/unit/lab_test.rb" "test/unit/link_test.rb" "test/unit/localization_test.rb" "test/unit/notification_test.rb" "test/unit/priority_test.rb" "test/unit/role_test.rb" "test/unit/supplier_type_test.rb" "test/unit/ticket_test.rb"
/usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:74:in `load_specification': undefined method `parse' for Time:Class (NoMethodError)
         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:307:in `date='
         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:296:in `date='
         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:384:in `send'
         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:384:in `initialize'
         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:383:in `each'
         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:383:in `initialize'
         from (eval):1:in `new'
         from (eval):1:in `load_specification'
          ... 24 levels...
         from /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader.rb:5:in `load'
         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:in `each'
         from /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader.rb:5
rake aborted!
Command failed with status (1): [/usr/local/bin/ruby -Ilib:test "/usr/local...]

Boy, I sure broke something. More weirdness:

$ rake migrate
(in /Users/james/Documents/Contract Jobs/HighGroove/robrady)
rake aborted!
WARNING: You have a nil object when you probably didn't expect it! Odds are you
want an instance of Array instead.

Look in the callstack to see where you're working with an object that could be nil.
Investigate your methods and make sure the object is what you expect!
./rakefile:201

James Edward Gray II

···

On Oct 20, 2005, at 9:14 AM, James Edward Gray II wrote:

I'm seeing the strangest error this morning.

I'm seeing the strangest error this morning. Does the following stack trace mean anything to anyone?

It looks like you might need to 'require "time"' somewhere (config/environment.rb is always a good choice), as the core Time class does not include a "parse" method.

- Jamis

···

On Oct 20, 2005, at 8:14 AM, James Edward Gray II wrote:

Thanks.

James Edward Gray II

$ rake test_units
(in /Users/james/Documents/Contract Jobs/HighGroove/robrady)
/usr/local/bin/ruby -Ilib:test "/usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader.rb" "test/unit/account_test.rb" "test/unit/company_test.rb" "test/unit/contact_test.rb" "test/unit/file_note_test.rb" "test/unit/file_status_test.rb" "test/unit/file_type_test.rb" "test/unit/grade_test.rb" "test/unit/lab_test.rb" "test/unit/link_test.rb" "test/unit/localization_test.rb" "test/unit/notification_test.rb" "test/unit/priority_test.rb" "test/unit/role_test.rb" "test/unit/supplier_type_test.rb" "test/unit/ticket_test.rb"
/usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:74:in `load_specification': undefined method `parse' for Time:Class (NoMethodError)
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:307:in `date='
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:296:in `date='
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:384:in `send'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:384:in `initialize'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:383:in `each'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:383:in `initialize'
        from (eval):1:in `new'
        from (eval):1:in `load_specification'
         ... 24 levels...
        from /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader.rb:5:in `load'
        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:in `each'
        from /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader.rb:5
rake aborted!
Command failed with status (1): [/usr/local/bin/ruby -Ilib:test "/usr/local...]

Can you run it with --trace enabled?

   $ rake --trace migrate

That might give us a more helpful backtrace.

- Jamis

···

On Oct 20, 2005, at 8:26 AM, James Edward Gray II wrote:

On Oct 20, 2005, at 9:14 AM, James Edward Gray II wrote:

I'm seeing the strangest error this morning.

Boy, I sure broke something. More weirdness:

$ rake migrate
(in /Users/james/Documents/Contract Jobs/HighGroove/robrady)
rake aborted!
WARNING: You have a nil object when you probably didn't expect it! Odds are you
want an instance of Array instead.

Look in the callstack to see where you're working with an object that could be nil.
Investigate your methods and make sure the object is what you expect!
./rakefile:201

After spending half a day hunting this down, I can tell you it's related to the salted_login_generator on Unix systems. The files it drops in test/mocks/test/ called time.rb is the source of the problem, though I can't explain exactly WHY yet. Windows seems unaffected but two different Unixes started throwing that missing parse() error.

James Edward Gray II

···

On Oct 20, 2005, at 9:38 AM, Jamis Buck wrote:

On Oct 20, 2005, at 8:14 AM, James Edward Gray II wrote:

I'm seeing the strangest error this morning. Does the following stack trace mean anything to anyone?

It looks like you might need to 'require "time"' somewhere (config/environment.rb is always a good choice), as the core Time class does not include a "parse" method.

Thanks for trying to help here, I believe I fixed this issue.

James Edward Gray II

···

On Oct 20, 2005, at 9:39 AM, Jamis Buck wrote:

Can you run it with --trace enabled?

  $ rake --trace migrate

That might give us a more helpful backtrace.