How to ignore a folder in Zeitwerk for Rails 6?

前端 未结 1 1805
滥情空心
滥情空心 2021-01-11 17:01

Simple question, but somehow the answer escapes me.

In moving to Rails 6 with Zeitwerk, I get:

Please, check the \"Autoloading and Reloading Constant         


        
相关标签:
1条回答
  • 2021-01-11 17:37

    I ran into this same issue, and it turns out it was complaining about a folder name.

    Adding this to application.rb may work for you:

    Rails.autoloaders.main.ignore(Rails.root.join('app/junkyard'))

    0 讨论(0)
提交回复
热议问题