-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faker translations missing when seeding data #285
Comments
I was exploring older issues and came across: #5 So I added |
I am seeing the same issue on multiple machines for multiple devs. We are trying to use Faker from the console to create a bunch of fake development data real fast. Seeing similar messages:
For us, typing:
...seems to work. Why isn't this just part of Faker when it loads?
|
This appears to be a duplicate of #278 |
* Add production_test gemfile group, to cover gems that are not strictly needed in production, but still required to test a production-like deployment; an example is 'faker', to seed the database with test data * Fix rubric rake task to avoid faker-ruby/faker#285 when run in a production environment
I get this too, FWIW, and |
I'm closing this issue because it's pretty old and it seems that you guys have already found the solution. Feel free to reopen this issue if you have a problem again in the future 👍 |
Yeah, it looks like the issue was caused by the failure to reload I18n. This seems to have been resolved by PR #811. |
Rails version: 4.1.7
Ruby version: 2.1.4
Faker version: 1.4.3
I am attempting to use
Faker
to generate seed data, which keeps failing.At first I was seeing the following error:
NameError: uninitialized constant Faker
So I added a
require 'faker'
to the top of myseeds.rb
file which resolved that issue.However it doesn't seem to be able to find any of the translations:
rake aborted! I18n::MissingTranslationData: translation missing: en.faker.lorem.words
Everything works fine in my
RSpec
tests withFaker
, just when it comes to seeding data there seems to be issues.Here is the stack trace:
The text was updated successfully, but these errors were encountered: