First of all I don't know if this is a bug or not. Until now I've been using this command in rails development.rb environment config so the box detects changes on my files:
config.reload_classes_only_on_change = false
But now, with Rails 5.2 and Active Storage that command makes the server a lot slower, and the images takes from 10 to 40sec to load.
Is it a bug? There is another way to make the vagrant/rails detect changes on my files without making me reload the server every time I change something?
Solution:
After questioning the owner of the box I've been using, he gave me this alternative that works:
At the bottom of the config/environments/development.rb
I did this change:
Find this line at the bottom of the file and comment out:
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
Then add this line:
config.file_watcher = ActiveSupport::FileUpdateChecker
So it looks like this:
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker
config.file_watcher = ActiveSupport::FileUpdateChecker
Now it works properly and I do not have to use this command anymore:
config.reload_classes_only_on_change = true
Best regards!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With