Couldn't find file 'jquery-ui'

后端 未结 6 1079
闹比i
闹比i 2020-12-08 09:10

I am getting the following error even if I have jquery-ui in my application.js file

couldn\'t find file \'jquery-ui\' (in /home/jeff/work/projects/a/media/app/asse

6条回答
  •  死守一世寂寞
    2020-12-08 09:31

    The rails 4 answer:

    add to gemfile.rb:

    gem 'jquery-ui-rails'
    

    add to application.js:

    //= require jquery
    //= require jquery-ui
    //= require jquery_ujs
    

    to add a specific module:

    //= require jquery
    //= require jquery-ui/yourmodulename
    //= require jquery_ujs
    

    I'm not sure if restarting your server is explicitly required but it never hurts anything.

提交回复
热议问题