1

I install ffaker but cannot find it in my PATH

masi@masi:~$ sudo gem install ffaker
Fetching: ffaker-2.6.0.gem (100%)
Successfully installed ffaker-2.6.0
Parsing documentation for ffaker-2.6.0
Installing ri documentation for ffaker-2.6.0
Done installing documentation for ffaker after 4 seconds
1 gem installed

masi@masi:~$ ff
ffmpeg    ffplay    ffprobe   ffserver  

masi@masi:~$ require 'ffaker'
bash: require: command not found

masi@masi:~$ sudo ffaker
sudo: ffaker: command not found

OS: Debian 9

Léo Léopold Hertz 준영
  • 6,788
  • 29
  • 91
  • 193

1 Answers1

1

Start the Interactive Ruby Shell , then run the command:

irb
irb(main):001:0> require 'ffaker'
=> true
exit

There is an example from the git repository :

irb
irb(main):001:0> require 'ffaker'
=> true
irb(main):002:0> FFaker::Name.name
=> "Danyelle Langosh"
irb(main):003:0> FFaker::Internet.email
=> "[email protected]"
irb(main):004:0> 
GAD3R
  • 63,407
  • 31
  • 131
  • 192
  • Do you know any minimal examples about how to generate fake data with the package? I want to test that it really works. – Léo Léopold Hertz 준영 Jul 29 '17 at 11:11
  • 1
    there is an example [here](http://search.cpan.org/~wsheldahl/Data-Faker-0.09/lib/Data/Faker.pm) , run `cpan Data::Faker` , create your `sample.pl` with the content of the synopsis then run `perl sample.pl` – GAD3R Jul 29 '17 at 12:13
  • What is the typical configuration for `cpan` installation? Options `(Choose 'local::lib', 'sudo' or 'manual')`. Sudo ok? – Léo Léopold Hertz 준영 Aug 01 '17 at 14:08