LoginSignup
6
6

More than 5 years have passed since last update.

Circular dependency detected while autoloading constant を防止する

Last updated at Posted at 2014-10-08

Capybara で Integration test を行う際にフロントエンド側で複数の Ajax リクエストが発行されるとテスト用に起動された Webrick がマルチスレッドで動いてしまい 同時に autolad_path にあるクラスやモジュール (e.g. concerns/*) の解決が行われてしまいエラーとなる場合がある

上記事象を避けるには以下の設定を追加する必要がある

config/environments/test.rb
  config.allow_concurrency = false

参考:
https://github.com/rails/rails/issues/15089#issuecomment-56104328
http://y-yagi.hatenablog.com/entry/2014/09/20/073819

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6