Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 5: Sprockets::FileNotFound - couldn't find file 'jquery-ui/autocomplete' with type 'application/javascript'

I just upgraded our Rails app from 4.2.5 to 5.0.1

The rails server boots up fine but when I try to load a page I'm now getting the error:

Sprockets::FileNotFound - couldn't find file 'jquery-ui/autocomplete' with type 'application/javascript'

When I run bundle I can see

Using jquery-rails 4.2.2
Using jquery-ui-rails 6.0.1
like image 885
Deekor Avatar asked Jan 09 '17 23:01

Deekor


2 Answers

change the line in application.js

from

//= require jquery-ui/autocomplete

to

 //= require jquery-ui/widgets/autocomplete
like image 198
Shiny Avatar answered Oct 14 '22 20:10

Shiny


Seems the file paths have changed. According to the gem readme:

Warning:

Due to directory structure changes between jQuery UI 1.10, 1.11, and 1.12, if you use version is lower than 6.0, you will have to use a different naming for the files to require, please check following links for more information: for 5.0 users, for 4.2 users.

like image 41
Deekor Avatar answered Oct 14 '22 19:10

Deekor