Rake aborted! You have a nil object when you didn't expect i

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

[email protected] 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)
[[email protected] 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???

your problem lies in the controller file and not in the migration one.
please post the controller file for evaluation.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs