My case was exceptionally weird. When I set up my old legacy app in Ubuntu 20 it worked fine until I rebooted my laptop. After that it displayed the error under question. I checked that I use correct RVM gemset with correct ruby version, gems were bundled as they should have.
When I changed the
//= require jquery-ui/autocomplete
to
//= require jquery-ui/widgets/autocomplete
this line passed and worked fine, but next ones starting causing problems.
Eventually I had to change all the following lines:
//= require jquery-ui/widgets/autocomplete
//= require jquery-ui/widgets/datepicker
//= require jquery-ui/widgets/droppable
EXCEPT THIS:
//= require jquery-ui/effect
and I have no idea why this single line works while others don't :/