Faker: Faker::Food not found

Created on 10 Sep 2016  路  5Comments  路  Source: faker-ruby/faker

Hi @stympy! Thank you for this gem!

While trying to use the food faker, I am getting this error on the latest release -

irb(main):109:0> Faker::Food.spice
NameError: uninitialized constant Faker::Food

All others are working fine for me. Any thoughts on what might be up with Food?

As an aside, I see a lot of new Faker libraries in the PRs. Are you considering merging them in?

Thank you!

Most helpful comment

@oyeanuj Food class is added 4 days ago and looks like still this is not pushed to rubygems so you are facing this issue.

You can directly specify git path and use this.

I have added following in my Gemfile

 gem 'faker', git: '[email protected]:stympy/faker.git'  

And on rails c

[2] pry(main)> Faker::Food.spice
=> "Methi"

Hope this helps.

All 5 comments

@oyeanuj Food class is added 4 days ago and looks like still this is not pushed to rubygems so you are facing this issue.

You can directly specify git path and use this.

I have added following in my Gemfile

 gem 'faker', git: '[email protected]:stympy/faker.git'  

And on rails c

[2] pry(main)> Faker::Food.spice
=> "Methi"

Hope this helps.

This issue is already resolved?

@nmenag It is not on gem version 1.6.6 (the released version). But @Shwetakale's method works!

Looks like it stopped working?

I have released version 1.7.1 of the gem which includes this class.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gerryhd picture gerryhd  路  3Comments

kevgathuku picture kevgathuku  路  4Comments

zyrthofar picture zyrthofar  路  6Comments

vnbrs picture vnbrs  路  5Comments

crispinheneise picture crispinheneise  路  6Comments