Получил проблему. В моем файле application.js есть следующие коды
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
В соответствии с функциональностью require_tree , он будет рекурсивно включать все js-файлы текущего пути.См. Ссылку https://guides.rubyonrails.org/asset_pipeline.html#manifest-files-and-directives
In JavaScript files, Sprockets directives begin with //=. In the above case, the file is using the require and the require_tree directives. The require directive is used to tell Sprockets the files you wish to require. Here, you are requiring the files rails-ujs.js and turbolinks.js that are available somewhere in the search path for Sprockets. You need not supply the extensions explicitly. Sprockets assumes you are requiring a .js file when done from within a .js file.
The require_tree directive tells Sprockets to recursively include all JavaScript files in the specified directory into the output. These paths must be specified relative to the manifest file. You can also use the require_directory directive which includes all JavaScript files only in the directory specified, without recursion.
. В моем приложении файл Gruntfile.js был объявлен в двух папках js. Так, когда я выполнял прекомпиляцию, поскольку файл был объявлен в двух js, он выбрасываетошибка при попытке сжать этот файл