资产管道找不到JS文件

时间:2012-01-13 22:07:14

标签: ruby-on-rails ruby-on-rails-3.1 asset-pipeline

My Rails.application.config.assets.paths包含我喜欢的资产的目录(自动填充):

- /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

autocomplete gem的lib / assets / javascripts包含:

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

我的application.js包括:

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

然而,我一直收到错误:

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

但是,找到任何其他资产都没有问题。我做错了什么?

1 个答案:

答案 0 :(得分:11)

正如问题的原始海报所述:


通过重新启动服务器解决了问题。