admin管理员组文章数量:1310272
I want to use rails-jquery-autoplete
gem for my rails application. However I got this error:
couldn't find file 'jquery-ui/autoplete' with type 'application/javascript'
My jquery-rails version is 4.3.1 and jquery-ui-rails version is 6.0.1.
application.js
//= require jquery
//= require jquery_ujs
//= require jquery-ui/autoplete
//= require autoplete-rails
//= require bootstrap-sprockets
//= require moment
//= require bootstrap-datetimepicker
//= require jquery.payment
//= require credit_card
//= require map
//= require owl.carousel.min
//= require carousel
//= require react
//= require react_ujs
//= require ponents
application.scss
*= require_self
*= require jquery-ui
Thank you in advance!
I want to use rails-jquery-autoplete
gem for my rails application. However I got this error:
couldn't find file 'jquery-ui/autoplete' with type 'application/javascript'
My jquery-rails version is 4.3.1 and jquery-ui-rails version is 6.0.1.
application.js
//= require jquery
//= require jquery_ujs
//= require jquery-ui/autoplete
//= require autoplete-rails
//= require bootstrap-sprockets
//= require moment
//= require bootstrap-datetimepicker
//= require jquery.payment
//= require credit_card
//= require map
//= require owl.carousel.min
//= require carousel
//= require react
//= require react_ujs
//= require ponents
application.scss
*= require_self
*= require jquery-ui
Thank you in advance!
Share Improve this question edited Aug 7, 2017 at 11:24 Graham Slick 6,87011 gold badges56 silver badges92 bronze badges asked Aug 7, 2017 at 10:56 JiaPingJiaPing 1192 silver badges14 bronze badges 5-
It should be
//= require jquery-ui/widgets/autoplete
github./jquery-ui-rails/jquery-ui-rails – Pardeep Dhingra Commented Aug 7, 2017 at 11:03 - 1 I added this line in my application.js file. However, it can't solve my problem. – JiaPing Commented Aug 7, 2017 at 11:13
- What error you are getting after adding this? – Pardeep Dhingra Commented Aug 7, 2017 at 11:18
- 1 I got the the same error message. – JiaPing Commented Aug 7, 2017 at 11:23
- having the same problem here...were you able to solve? – Tamiz Ahmed Commented Aug 23, 2017 at 7:25
3 Answers
Reset to default 10If You have install jquery-ui-rails gem. Remove rails-jquery-autoplete gem from your project.Just add this line:
//= require jquery-ui/widgets/autoplete
Restart your server after adding a gem or a library.
I made a temporary fix. My error message plained about jquery-ui/widgets/autoplete
.
In my system, the autoplete.js
file is at ...gems/jquery-ui-rails-5.0.5/app/assets/javascripts/jquery-ui
. When in that directory, I said
mkdir widgets
cd widgets
ln -s ../autoplete.js autoplete.js
I could not test if autoplete actually works now, but at least the error message went away.
本文标签:
版权声明:本文标题:[Ruby on Rails]couldn't find file 'jquery-uiautocomplete' with type 'applicationjavascript&# 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741840926a2400492.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论