Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
131 views
in Technique[技术] by (71.8m points)

javascript - Couldn't find file 'jquery-ui'

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/assets/javascripts/application.js:14)

application.js

//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require jquery.validate.min

Can anybody help me?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Use specific version of gem "jquery-rails", "~> 2.3.0" as later version of gem has deleted the ui part.

or

you can use gem "jquery-ui-rails" for jquery-ui . For more information please visit the git repository

To require all jQuery UI modules, add the following to your application.js:

for version 5.0 and more it has been changed. Please follow the link

application.js:

//= require jquery-ui

application.css:

/*
 *= require jquery-ui
 */

For lesser version than 5.0 we need to write below format

application.js:

//= require jquery.ui.all

Also add the jQuery UI CSS to your application.css:

application.css:

/*
 *= require jquery.ui.all
 */

Hope this could help you


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...