factory_bot_rails: Reloading Issue Triggering Resolved Rails Bug
Related Rails issue: https://github.com/rails/rails/issues/32700
Steps to reproduce
- Creating a new rails project with ruby 2.5.3 and rails 6.0.0.beta3
- Add
gem 'factory_bot_rails', '~> 5.0', '>= 5.0.1'
to the gemfile - Install gems
bundle install
- boot up the rails server
bundle exec rails s
- view errors in server output
Expected behavior
Adding factory_bot_rails
gem to a rails project should not trigger ** ERROR: directory is already being watched! **
when booting up a rails server or console
Actual behavior
After including the gem in my project, I’m getting the following errors in my server when running the rails server…
be rails s
=> Booting Puma
=> Rails 6.0.0.beta3 application starting in development
=> Run `rails server --help` for more startup options
** ERROR: directory is already being watched! **
Directory: /path/to/my/app/node_modules/.bin/compression-webpack-plugin
is already being watched through: /path/to/my/app/node_modules/compression-webpack-plugin
MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors
** ERROR: directory is already being watched! **
Directory: /path/to/my/app/node_modules/.bin/mini-css-extract-plugin
is already being watched through: /path/to/my/app/node_modules/mini-css-extract-plugin
MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors
(node:33074) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
** ERROR: directory is already being watched! **
Directory: /path/to/my/app/node_modules/@rails/webpacker/node_modules/.bin/compression-webpack-plugin
is already being watched through: /path/to/my/app/node_modules/compression-webpack-plugin
MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors
** ERROR: directory is already being watched! **
Directory: /path/to/my/app/node_modules/@rails/webpacker/node_modules/.bin/mini-css-extract-plugin
is already being watched through: /path/to/my/app/node_modules/mini-css-extract-plugin
MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors
Puma starting in single mode...
* Version 3.12.1 (ruby 2.5.3-p105), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
System configuration
Rails version: 6.0.0.beta3
Ruby version: 2.5.3
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 16 (2 by maintainers)
Commits related to this issue
- Do not register a reloader when file paths not exist If all the paths specified in `FactoryBot.definition_file_paths` do not exist, an empty array is passed to the reloader. If an empty array is spe... — committed to y-yagi/factory_bot_rails by y-yagi 5 years ago
- Do not register a reloader when file paths not exist If all the paths specified in `FactoryBot.definition_file_paths` do not exist, an empty array is passed to the reloader. If an empty array is spe... — committed to y-yagi/factory_bot_rails by y-yagi 5 years ago
- Do not register a reloader when file paths not exist If all the paths specified in `FactoryBot.definition_file_paths` do not exist, an empty array is passed to the reloader. If an empty array is spe... — committed to y-yagi/factory_bot_rails by y-yagi 5 years ago
- Do not register a reloader when file paths not exist If all the paths specified in `FactoryBot.definition_file_paths` do not exist, an empty array is passed to the reloader. If an empty array is spe... — committed to thoughtbot/factory_bot_rails by y-yagi 5 years ago
@composerinteralia factory_bot_rails
5.0.1
Ruby2.6.1
Rails5.2.2.1