您好我在Rails 4.1.5
上收到了错误Sprockets::FileNotFound: couldn't find file 'jquery-fileupload/basic.js'
我搜索了一些相关的问题,但找不到解决方案。
//= require jquery
//= require jquery-ui
//= require jquery_ujs
//= require twitter/bootstrap
//= require jquery-fileupload/basic
//= require jquery-fileupload/vendor/tmpl
我使用rbenv并且gem /jquery-fileupload-rails-0.4.1
结构是
.
└── jquery-fileupload
├── basic.js
├── cors
│ ├── jquery.postmessage-transport.js
│ └── jquery.xdr-transport.js
├── index.js
├── jquery.fileupload-fp.js
├── jquery.fileupload-ui.js
├── jquery.fileupload.js
├── jquery.iframe-transport.js
├── locale.js
└── vendor
├── canvas-to-blob.js
├── jquery.ui.widget.js
├── load-image.js
└── tmpl.js
当我跑rake assets:precompile --trace
我收到以下错误消息
/Users/hsu-wei-cheng/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/actionpack-4.1.5/lib/action_dispatch/http/mime_type.rb:163: warning: already initialized constant Mime::PDF
/Users/hsu-wei-cheng/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/actionpack-4.1.5/lib/action_dispatch/http/mime_type.rb:163: warning: previous definition of PDF was here
** Execute assets:precompile
rake aborted!
Sprockets::FileNotFound: couldn't find file 'jquery-fileupload/basic.js'
(in /Users/hsu-wei-cheng/workspace/Rails/dqa_dev_server/app/assets/javascripts/application.js:18)
/Users/hsu-wei-cheng/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/sprockets-2.11.0/lib/sprockets/context.rb:106:in `resolve'
/Users/hsu-wei-cheng/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/sprockets-2.11.0/lib/sprockets/context.rb:146:in `require_asset'
/Users/hsu-wei-cheng/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/sprockets-2.11.0/lib/spro
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'jquery.fileupload-rails', "~> 1.10.0"
gem 'twitter-bootstrap-rails'
gem "bootstrap-sass", "~> 3.1.1"
gem "compass-rails"
gem "therubyracer"
gem "execjs"
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'