Using Faker in production

Hi all. I’m trying to use Faker to generate usernames in a controller. It works fine in my local development version, but fails with the following error when I try to run it on a production server:

I18n::MissingTranslationData (translation missing:

./plugin.rb contains

gem 'faker', '2.19.0', {require: false }

The top of ./app/controllers/loners_controller.rb is

require 'faker'
I18n.reload! # I found this trick on StackOverflow, but it doesn't help

Then I just call it like

user.username =

Does anyone have any clue why this doesn’t work?

1 Like