Debian

如何在 Debian 中啟動 gem ffaker?

  • July 29, 2017

我安裝了 ffaker但在我的 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

作業系統:Debian 9

啟動Interactive Ruby Shell,然後執行以下命令:

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

git儲存庫中有一個範例:

irb
irb(main):001:0> require 'ffaker'
=> true
irb(main):002:0> FFaker::Name.name
=> "Danyelle Langosh"
irb(main):003:0> FFaker::Internet.email
=> "kristle.kiehn@senger.name"
irb(main):004:0> 

引用自:https://unix.stackexchange.com/questions/382544