rake db:seed を実行していますが、次のエラーが発生します。
-- create_table("users", {:force=>true})
-> 0.0097s
-- add_index("users", ["email"], {:name=>"index_users_on_email", :unique=>true})
-> 0.0009s
-- add_index("users", ["reset_password_token"], {:name=>"index_users_on_reset_password_token", :unique=>true})
-> 0.0008s
-- initialize_schema_migrations_table()
-> 0.0029s
DEFAULT USERS
rake aborted!
can't dup NilClass
/Users/shrav/mvhomefront/db/seeds.rb:9:in `dup'
/Users/shrav/mvhomefront/db/seeds.rb:9:in `<top (required)>'
/Users/shrav/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
/Users/shrav/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `block in load'
/Users/shrav/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/Users/shrav/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
/Users/shrav/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/engine.rb:540:in `load_seed'
/Users/shrav/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.0.0/lib/active_record/tasks/database_tasks.rb:153:in `load_seed'
/Users/shrav/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.0.0/lib/active_record/railties/databases.rake:181:in `block (2 levels) in <top (required)>'
/Users/shrav/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.0.0/lib/active_record/railties/databases.rake:140:in `block (2 levels) in <top (required)>'
/Users/shrav/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
/Users/shrav/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => db:setup => db:seed
(See full trace by running task with --trace)
これが私のseed.rbです
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel', city: cities.first)
puts 'DEFAULT USERS'
user = User.find_or_create_by_email :name => ENV['ADMIN_NAME'].dup, :email => ENV['ADMIN_EMAIL'].dup, :password => ENV['ADMIN_PASSWORD'].dup, :password_confirmation => ENV['ADMIN_PASSWORD'].dup
puts 'user: ' << user.name
これはうまくいくはずなので、何が悪いのかわかりません。他に投稿する必要があることを教えてください。私のリポジトリは github.com/shravmehta/mvhomefront にあります。最新のコミットから何も変更していません。