How to seed with Faker gem (Rails)

  1. Install Faker gem
gem install faker
require 'faker'
  1. Code below is useful to add prior to create your seeds. So that if you need to re-seed your file, it will erase data from previous seeding.

--

--

--

Software Engineer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Apple Cider Vinegar Drink for More Fat Loss During a Fast

What a party without pinata? PinataNFT

Spend 30 minutes each day to write an essay.

Fatty Liver Doesn’t Show Up In Scans Until It’s Too Late.

#Muse #Set #Launch #Compatible #EEG #Headband

The Unsharpener

And White to Celebrate the Day

My Quarantine Diary — Day 8

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Avery Lin

Avery Lin

Software Engineer

More from Medium

Blog 2: Jan 24 — Jan 30

FUN ACTIVITY

Progressing somewhere…

All things DAO and what makes BiaDAO so unique?