这真的很奇怪,我只是尝试了一个Gemfile
:
source 'https://rubygems.org'
gem 'rails', '3.2.12'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem "jquery-fileupload-rails"
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
在 application.js 上
//= require jquery
//= require jquery_ujs
//= require_tree .
//= require jquery-fileupload/basic
并且工作得很好,你运行 bundle 了吗?我知道这是一个愚蠢的问题,但它可能是