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

12,223

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
Share:
12,223
Tyler Daniels
Author by

Tyler Daniels

Updated on June 26, 2022

Comments

  • Tyler Daniels
    Tyler Daniels almost 2 years

    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.