Forum: Rails deployment rake aborted! You have a nil object when you didn't expect i

Posted by Tincy Mathew (muxstudycentre1)
on 2010-09-22 16:36

i created one  model called team  so a migration is  created and i
edited  the migration like this

class CreateTeams < ActiveRecord::Migration
  def self.up
    create_table :teams do |t|
      t.string :country
      t.string :group
      t.string :captain

      t.timestamps
    end
  end

  def self.down
    drop_table :teams
  end
end

when i tried  to rake

i am  getting an issue like this

mathew@mathew mux]$ rake db:migrate
(in /home/mathew/user/mux)
rake aborted!
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.size

(See full trace by running task with --trace)
[mathew@mathew mux]$ rake db:migrate
(in /home/mathew/user/mux)
rake aborted!
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.size






rake aborted! You have a nil object when you didn't expect it! You might
have expected an instance of Array. The error occurred while evaluating
nil.size


i tried my leval best  but not getting anything  correct,any one can
help????
Posted by Andola Soft (andolasoft)
on 2010-10-12 15:08
your problem lies in the controller file and not in the migration one. 
please post the controller file for evaluation.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.