Sprockets :: FileNotFound:找不到文件' jquery.ui.all'在Rails上4

时间:2014-07-20 22:44:46

标签: rake assets precompile

Sprockets::FileNotFound: couldn't find file 'jquery.ui.all'

我尝试了迄今为止发现的所有建议。    它们都不适合我。    我无法继续运行开发中的程序,因此我不能再在线进行新的部署了。

的Gemfile

source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.0'

gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '>=1.1.2'
gem 'pg', '>=0.15.1'
gem 'uglifier', '>=2.1.1'
gem 'coffee-rails', '>=4.0.0'
gem 'jbuilder', '~> 1.2'
gem 'activerecord-import', '>=0.4.1'
gem 'rubyzip2'
gem 'date_validator'
gem 'psych', '~> 2.0.5'

gem 'json', '>=1.8.1'
gem 'turbolinks', '>=1.1.1'
gem 'sass-rails', '>=4.0.0'
gem 'bootstrap-sass', '>=3.0.0.0'
gem 'will_paginate', '>=3.0.4'
gem 'bootstrap-will_paginate','>=0.0.9'
gem 'bootstrap-sass-rails'
gem 'bootstrap-datepicker-rails'
gem 'jquery-ui-bootstrap-rails'
gem 'geocoder'
gem 'jquery', '>=0.0.1'
gem 'jquery-rails', '>=2.2.1'
gem 'jquery-datatables-rails', github: 'rweng/jquery-datatables-rails'
gem 'jquery-ui-rails'
gem 'gmaps4rails'

group :doc do
  gem 'sdoc', '>=0.3.20',require: false
end

group :production do
  gem 'rails_12factor', '>=0.0.2'
end

group :test do
  gem 'selenium-webdriver', '>=2.0.0'
  gem 'capybara', '>=2.1.0'
  gem 'factory_girl_rails', '>=4.2.1'
end

group :development, :test do
  gem 'rspec-rails', '>=2.13.1'
end

My application.js is 
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.0'

gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '>=1.1.2'
gem 'pg', '>=0.15.1'
gem 'uglifier', '>=2.1.1'
gem 'coffee-rails', '>=4.0.0'
gem 'jbuilder', '~> 1.2'
gem 'activerecord-import', '>=0.4.1'
gem 'rubyzip2'
gem 'date_validator'
gem 'psych', '~> 2.0.5'

gem 'json', '>=1.8.1'
gem 'turbolinks', '>=1.1.1'
gem 'sass-rails', '>=4.0.0'
gem 'bootstrap-sass', '>=3.0.0.0'
gem 'will_paginate', '>=3.0.4'
gem 'bootstrap-will_paginate','>=0.0.9'
gem 'bootstrap-sass-rails'
gem 'bootstrap-datepicker-rails'
gem 'jquery-ui-bootstrap-rails'
gem 'geocoder'
gem 'jquery', '>=0.0.1'
gem 'jquery-rails', '>=2.2.1'
gem 'jquery-datatables-rails', github: 'rweng/jquery-datatables-rails'
gem 'jquery-ui-rails'
gem 'gmaps4rails'

group :doc do
  gem 'sdoc', '>=0.3.20',require: false
end

group :production do
  gem 'rails_12factor', '>=0.0.2'
end

group :test do
  gem 'selenium-webdriver', '>=2.0.0'
  gem 'capybara', '>=2.1.0'
  gem 'factory_girl_rails', '>=4.2.1'
end

group :development, :test do
  gem 'rspec-rails', '>=2.13.1'
end

application.css

/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the top of the
 * compiled file, but it's generally better to create a new file per style scope.


*= require dataTables/src/demo_table_jui
*= require dataTables/extras/dataTables.colReorder
*= require dataTables/extras/dataTables.tableTools
*= require dataTables/bootstrap/3/jquery.dataTables.bootstrap
*= require dataTables/extras/dataTables.tableTools

*= require bootstrap
*= require jquery.ui.all
*= require jquery.ui.core
*= require jquery.ui.theme
*= require bootstrap-datepicker

*= require_self
*= require_tree .

*/

2 个答案:

答案 0 :(得分:30)

我遇到了类似的问题,事实证明他们在某些时候开始使用jquery-ui代替jquery.ui,而且不再需要all部分了

//= require jquery-ui

有关详细信息,请参阅jquery-ui-rails页面上标题为Require Specific Modules的部分。

答案 1 :(得分:-7)

我发现了问题。在两侧的文件和文件夹名称中引入更改时,将引导程序与数据表集成时,任何工作都不再有效。所以我将它们分开,我使用bootstrap按钮和菜单以及数据表html样式,没有bootstrap集成并且工作完美,快速和流畅。看起来这些人无法跟上彼此。