-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not a directory error on Linux in development (eager_loading issue) #37011
Comments
Currently, autoload paths pass to the watcher as directories. If using evented watcher, this possibly pass as it is to `Listen`. But autoload paths include files and `Listen` raise an error when was passed file. So, it is necessary to classify files and directories correctly. Fixes rails#37011.
The problem here, really, is that The patch that addreesed this issue processes files in In Rails 7.1 the fix is going to be different. The new code iterates over |
Previously, the Rails application would reload due to changes in files outside the autoreload paths. For instance, editing `app/README.md` would trigger a reload, even though the reloaded classes and modules were identical to those loaded previously. This commit fixes this issue by ensuring the application reloads correctly according to `Rails.autoloaders.main.dirs`, thereby preventing unnecessary reloads. rails#37011 (comment)
Previously, the Rails application would reload due to changes in files outside the autoload paths. For instance, editing `app/README.md` would trigger a reload, even though the reloaded classes and modules were identical to those loaded previously. This commit fixes this issue by ensuring the application reloads correctly according to `Rails.autoloaders.main.dirs`, thereby preventing unnecessary reloads. rails#37011 (comment)
Previously, the Rails application would reload due to changes in some files outside the autoload paths. For instance, editing `app/README.md` would trigger a reload, even though the reloaded classes and modules were identical to those loaded previously. This commit fixes this issue by ensuring the application reloads correctly according to `Rails.autoloaders.main.dirs`, thereby preventing unnecessary reloads. rails#37011 (comment)
Previously, the Rails application would reload due to changes in some files outside the autoload paths. For instance, editing `app/README.md` would trigger a reload, even though the reloaded classes and modules were identical to those loaded previously. This commit fixes this issue by ensuring the application reloads correctly according to `Rails.autoloaders.main.dirs`, thereby preventing unnecessary reloads. rails#37011 (comment)
I wanted to have a
README.md
file in rails/app
directory explaining the code architecture and so on, but I found that it's causing a problem on linux machines in development. Problem does not occur on other environments that use linux or on MacOS.I'm getting a
not a directory
error forapp/README.md
file.Steps to reproduce
The same steps reproduced with rails
5.2.3
give the expected behavior.Reverting this line change also gives the expected behavior.
Expected behavior
Actual behavior
Not a directory @ dir_initialize - [test_app root]/app/README.md (Errno::ENOTDIR)
System configuration
Rails version:
6.0.0
Ruby version:
2.6.3
System:
Ubuntu 18.04 / Linux Mint 19.1
Workaround
In
config/application.rb
:The text was updated successfully, but these errors were encountered: