儘管提出了類似的問題,但沒有提出解決方案。Rails 4.1.4:/ admin上的Sprockets :: FileNotFound找不到文件'jquery.ui.all'
從Rails 4.0.0升級到Rails 4.1.4之前的一切工作。由於調試這個部分,我刪除了Gemfile.lock的與再生「包安裝」
4.1.4的Rails的Ruby 2.0
鏈輪限制到2.11.0由於2.12.x問題不工作Rails 4.1.4。 sass-rails限制到4.0.2。作爲與限制鏈輪版本相同的問題的一部分。
的Gemfile:
source 'https://rubygems.org'
gem 'rails', '= 4.1.4'
gem 'sass-rails', '4.0.2'
gem 'haml-rails'
gem 'coffee-rails'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'uglifier'
gem 'therubyracer'
gem 'turbolinks'
group :development do
gem 'thin'
gem 'erb2haml'
gem 'capistrano'
gem 'rvm-capistrano'
gem 'rspec-rails'
end
gem 'jbuilder'
gem 'mysql2', '~> 0.3.12b5'
gem "sprockets", "2.11.0"
gem 'better_errors', group: :development
gem 'sprockets_better_errors', group: :development
gem 'binding_of_caller', group: :development
gem 'quiet_assets', group: [:development, :test]
# Lots more gems omitted...
從Gemfile.lock的摘錄:
jquery-rails (3.1.1)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (5.0.0)
railties (>= 3.2.16)
所述的CoffeeScript包含jquery.ui.all行:
#= require active_admin/base
#= require jquery
#= require jquery_ujs
#= require jquery.ui.all
從實際的錯誤「bundle exec rake assets:precompile」:
03:58:54:website >> bundle exec rake assets:precompile
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.1.4/lib/action_dispatch/http/mime_type.rb:163: warning: already initialized constant Mime::VCF
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.1.4/lib/action_dispatch/http/mime_type.rb:163: warning: previous definition of VCF was here
rake aborted!
Sprockets::FileNotFound: couldn't find file 'jquery.ui.all'
(in /Users/mwlang/projects/clients/law/site/website/app/assets/javascripts/active_admin.js.coffee:4)
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/context.rb:106:in `resolve'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/context.rb:146:in `require_asset'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/directive_processor.rb:217:in `process_require_directive'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/directive_processor.rb:167:in `block in process_directives'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/directive_processor.rb:165:in `each'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/directive_processor.rb:165:in `process_directives'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/directive_processor.rb:99:in `evaluate'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/context.rb:197:in `block in evaluate'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/context.rb:194:in `each'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/context.rb:194:in `evaluate'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:12:in `initialize'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/base.rb:374:in `new'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/base.rb:374:in `block in build_asset'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/base.rb:395:in `circular_call_protection'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/base.rb:373:in `build_asset'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/index.rb:94:in `block in build_asset'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/caching.rb:58:in `cache_asset'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/index.rb:93:in `build_asset'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/base.rb:287:in `find_asset'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/index.rb:61:in `find_asset'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/bundled_asset.rb:16:in `initialize'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/base.rb:377:in `new'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/base.rb:377:in `build_asset'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/index.rb:94:in `block in build_asset'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/caching.rb:58:in `cache_asset'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/index.rb:93:in `build_asset'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/base.rb:287:in `find_asset'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/index.rb:61:in `find_asset'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:211:in `block in find_asset'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:257:in `benchmark'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:210:in `find_asset'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:119:in `block in compile'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:118:in `each'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:118:in `compile'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:60:in `block (3 levels) in define'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-2.11.0/lib/rake/sprocketstask.rb:146:in `with_logger'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:59:in `block (2 levels) in define'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/bin/ruby_noexec_wrapper:14:in `eval'
/Users/mwlang/.rvm/gems/ruby-2.0.0-p451/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => assets:precompile
我可能需要分叉和更新寶石規格。當我嘗試以上時,activeadmin抱怨,因爲它指定jquery-ui-rails(〜> 5.0),而上面的分支被識別爲4.1.0 –
我有同樣的問題,解決方案無法正常工作。即使使用gem'jquery-ui-rails',github:'joliss/jquery-ui-rails',分支:'rails-4.0.2'並且在執行$ bundle更新後仍然使用jquery-ui-rails 5.0.0和我不能運行我的程序...請幫忙 – Chleo