1

After running rake db:seed, I get the following error: NameError: uninitialized constant Faker

gem file

gem 'ffaker'

seeds.rb file

10.times do
     Employee.create(
        email: Faker::Internet.email,
        password: Faker::Internen.password,
        fname: Faker::Name.first_name,
        lname: Faker::Name.last_name
      ) 
end 

Is there something that I am missing? What if I wanted to add a custom range? Would I just use a definition block? Any help is greatly appreciated.

Anees
  • 33
  • 1
  • 5

1 Answers1

2

You should use FFaker namespace (not Faker).

Look at official examples here.

Maxim
  • 9,701
  • 5
  • 60
  • 108
  • 3
    you have got to be kidding me. I will off myself shortly after this. Thanks man for the quick help. – Anees Mar 19 '15 at 17:08