资产管道找不到JS文件

时间:2021-10-01 09:47:29

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

我的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

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

autocomplete gem的lib / assets / javascripts包含:

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

And my application.js includes:

我的application.js包括:

//= 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 个解决方案

#1


11  

As stated by the original poster of the question:

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


The problem was fixed by restarting the server.

通过重新启动服务器修复了此问题。

#1


11  

As stated by the original poster of the question:

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


The problem was fixed by restarting the server.

通过重新启动服务器修复了此问题。