Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sprockets::FileNotFound - couldn't find file 'jquery.ui'

This has been asked a few times, but I tried the solutions provided and they still didn't help, so I'm asking a new question.

Gemfile

gem 'jquery-ui-rails'

As suggested, I placed my gem outside the :assets group

Application.css~

 *= require_self
 *= require jquery.ui
 *= require bootstrap-datepicker
 *= require jquery.timepicker
 *= require_tree .
 */

The Rails Asset Pipeline loads assets based on the order they are listed. Here, I have it at number 2 on the list.

Application.css.scss

*= require_self
*= require fullcalendar
*= require jquery.ui
*= require fullcalendar_engine/application

Application.js

//= require jquery
//= require jquery.ui
//= require jquery_ujs
//= require wice_grid
//= require turbolinks
//= require fullcalendar

Once again, jquery.ui is loaded immediately after jquery.

I also ran bundle list to ensure my gems are up to date.

jquery-rails (3.1.2)
jquery-ui-rails (5.0.3)

I am using the updated versions of these gems. Also, I no longer type in jquery.ui.all

It looks like I've followed most of the suggestions from previous answers, but to no avail.

like image 982
Tyler Daniels Avatar asked Dec 04 '14 06:12

Tyler Daniels


1 Answers

The second line in your application.css file should be:

 *= require jquery-ui

not

 *= require jquery.ui

dash not dot, see here.

Same with your application.js file:

//= require jquery-ui
like image 200
Ken Stipek Avatar answered Nov 01 '22 18:11

Ken Stipek