Search code examples
ruby-on-railsruby-on-rails-5

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

Solution

  • 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.