我在本地没有得到任何错误,但是当我推到Heroku(我不在本地预编译)时,我得到:
...
I, [2014-03-13T23:06:50.444079 #3521] INFO -- : Writing /tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/public/assets/jquery-2.0.3.min-85a805038cb99ffbfec3467f84cad4c0.map
rake aborted!
wrong number of arguments (2 for 1)
(in /tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/app/assets/stylesheets/application.scss)
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sass-3.2.14/lib/sass/importers/filesystem.rb:16:in `initialize'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/sass_importer.rb:11:in `initialize'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/compass-rails-1.1.6/lib/compass-rails/patches/sass_importer.rb:7:in `new'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/compass-rails-1.1.6/lib/compass-rails/patches/sass_importer.rb:7:in `block in evaluate'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/compass-rails-1.1.6/lib/compass-rails/patches/sass_importer.rb:7:in `map'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/compass-rails-1.1.6/lib/compass-rails/patches/sass_importer.rb:7:in `evaluate'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/context.rb:197:in `block in evaluate'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/context.rb:194:in `each'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/context.rb:194:in `evaluate'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/processed_asset.rb:12:in `initialize'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/base.rb:374:in `new'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/base.rb:374:in `block in build_asset'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/base.rb:395:in `circular_call_protection'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/base.rb:373:in `build_asset'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/index.rb:94:in `block in build_asset'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/caching.rb:58:in `cache_asset'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/index.rb:93:in `build_asset'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/base.rb:287:in `find_asset'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/index.rb:61:in `find_asset'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/bundled_asset.rb:16:in `initialize'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/base.rb:377:in `new'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/base.rb:377:in `build_asset'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/index.rb:94:in `block in build_asset'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/caching.rb:58:in `cache_asset'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/index.rb:93:in `build_asset'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/base.rb:287:in `find_asset'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/index.rb:61:in `find_asset'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/manifest.rb:211:in `block in find_asset'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/manifest.rb:257:in `benchmark'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/manifest.rb:210:in `find_asset'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/manifest.rb:119:in `block in compile'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/manifest.rb:118:in `each'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/sprockets/manifest.rb:118:in `compile'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:60:in `block (3 levels) in define'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.0/lib/rake/sprocketstask.rb:146:in `with_logger'
/tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:59:in `block (2 levels) in define'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app
To [email protected]:dailydeed.git
! [remote rejected] master -> master (pre-receive hook declined)
在我的Gemfile中:
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rake'
gem 'fancybox-rails'
gem 'rails', '4.0.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'devise', '~> 3.0.0.rc'
gem 'compass-rails', '~> 1.1.6'
gem 'ffi', '= 1.9.0'
gem 'zurb-foundation', '~> 4.0.0'
gem 'cancan'
gem 'rolify', '~> 3.2.0'
gem 'will_paginate', '~> 3.0'
gem 'geocoder'
gem 'carrierwave', '~> 0.9'
gem 'mini_magick'
gem 'sass-rails', '~> 4.0.0'
group :development do
gem 'sqlite3'
gem 'debugger'
gem 'populator'
gem 'ffaker'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
# Use Uglifier as compressor for JavaScript assets
group :assets do
gem 'therubyracer', platforms: :ruby
gem 'uglifier', '>= 1.3.0'
end
我不知道还有什么可以证明。我使用的是foundation framework和compass,并对其进行了配置,以便heroku执行资产的预编译。
最佳答案
Writing /tmp/build_61158595-7e19-4bb5-88f0-728f7ab59f3f/public/assets/jquery-2.0.3.min-85a805038cb99ffbfec3467f84cad4c0.map
wrong number of arguments (2 for 1)
我认为您的错误与您的JS有关-您是再次调用JQuery还是什么你的
application.js
中的任何调用呢——你调用的函数有多个参数吗?关于ruby-on-rails - Heroku在到达application.scss后无法预编译 Assets ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/22393109/