Asset Pipeline not finding JS file

别等时光非礼了梦想. 提交于 2019-12-23 07:00:04

问题


My Rails.application.config.assets.paths contains the directory for an asset I'd like (autocomplete):

- /Users/kiranb/application/app/assets/images
- /Users/kiranb/application/app/assets/javascripts
- /Users/kiranb/application/app/assets/stylesheets
- /Users/kiranb/application/vendor/assets/javascripts
- /Users/kiranb/application/vendor/assets/stylesheets
- /Users/kiranb/.rvm/gems/ruby-1.9.2-p290@application/gems/rails3-jquery-autocomplete-1.0.5/lib/assets/javascripts
- /Users/kiranb/.rvm/gems/ruby-1.9.2-p290@application/gems/jquery-rails-1.0.19/vendor/assets/javascripts

The lib/assets/javascripts for the autocomplete gem contains:

autocomplete-rails-uncompressed.js  autocomplete-rails.js

And my application.js includes:

//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require autocomplete-rails
//= require_tree .

However, I keep getting the error:

couldn't find file 'autocomplete-rails'  
   (in /Users/kiranb/application/app/assets/javascripts/application.js:11)

It has no trouble finding any other assets, though. What am I doing wrong?


回答1:


As stated by the original poster of the question:


The problem was fixed by restarting the server.



来源:https://stackoverflow.com/questions/8857900/asset-pipeline-not-finding-js-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!