ファクトリが作成できない
コマンドが見つからないようで、実行できない。。
$ rails g factory_bot:model user
Running via Spring preloader in process 81847
Could not find generator 'factory_bot:model'.
Run `rails generate --help` for more options.
解決策
古いプロセスに接続していることが原因でした。
下記で停止して、
$ spring stop
もう一回ファクトリを作成すると、
$ rails g factory_bot:model user
Running via Spring preloader in process 89115
create spec/factories/users.rb
成功しました!
おまけ:springはアプリケーションプリローダー
Springとは、Rails4.1から標準で付属するようになったアプリケーションプリローダーです。
Rails内では様々なライブラリのロードなどの前処理が行われるので、コマンドを実行するための待ち時間がかかってしまいます。
事前にバックグラウンドでライブラリをロードしておくことで、その待ち時間を短くするものがアプリケーションプリローダーです。
railsコマンドを素早く実行するためのライブラリだったんですね。
参考
Rails 4 + react-rails gem: Could not find generator 'react:install'