angelica-thd / SaaS

A RestAPI implementation of a to-do list with Ruby on Rails using httpie for testing.
0 stars 0 forks source link

unitialized constant Faker::StarWars #2

Closed angelica-thd closed 3 years ago

angelica-thd commented 3 years ago

uninitialized constant Faker (NameError) I already have faker gem in my gemfile and the gem's version is faker (2.12.0) my code was:

FactoryBot.define do
  factory :item do
    name { Faker::StarWars.character }
    done false
    todo_id nil
  end
end
angelica-thd commented 3 years ago

After some research on the faker gem, I found faker's latest version is 2.15 and there is no Faker::StarWars class but there is a Faker::Movies::StarWars one so I simply changed Faker::StarWars to Faker::Movies::Starwars and everything worked!