0

这是我尝试将 git 推送到 heroku 时遇到的错误。我刚刚创建了一个非常简单的脚手架并添加了一些 JavaScript。这只是一个小小的hello world程序。对于 jquery 和 jquery ui,我刚刚手动链接并且没有使用 gem 文件,因为使用它对我不起作用。我推送时的其余输出已被省略,因为它们只是我们在推送期间看到的常规内容。有任何想法吗?

-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
   Running: rake assets:precompile
   rake aborted!
   Unexpected character '#' (line: 423, col: 0, pos: 13212)
   Error
   at new JS_Parse_Error (/tmp/execjs20130716-578-jc9asx.js:2357:10736)
   at js_error (/tmp/execjs20130716-578-jc9asx.js:2357:10955)
   at parse_error (/tmp/execjs20130716-578-jc9asx.js:2357:12489)
   at Object.next_token [as input] (/tmp/execjs20130716-578-jc9asx.js:2357:17217)
   at next (/tmp/execjs20130716-578-jc9asx.js:2357:18479)
   at semicolon (/tmp/execjs20130716-578-jc9asx.js:2357:19324)
   at simple_statement (/tmp/execjs20130716-578-jc9asx.js:2357:21849)
   at /tmp/execjs20130716-578-jc9asx.js:2357:20245
   at /tmp/execjs20130716-578-jc9asx.js:2357:19536
   at /tmp/execjs20130716-578-jc9asx.js:2357:31209
   (in /tmp/build_2d5im50v1anke/app/assets/javascripts/application.js)/tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:68:in `extract_result'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:28:in `block in exec'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:41:in `compile_to_tempfile'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:27:in `exec'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/uglifier-2.1.2/lib/uglifier.rb:176:in `really_compile'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/uglifier-2.1.2/lib/uglifier.rb:100:in `compile'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/uglifier_compressor.rb:25:in `evaluate'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/context.rb:197:in `block in evaluate'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/context.rb:194:in `each'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/context.rb:194:in `evaluate'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/bundled_asset.rb:25:in `initialize'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/base.rb:377:in `new'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/base.rb:377:in `build_asset'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/index.rb:94:in `block in build_asset'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/caching.rb:58:in `cache_asset'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/index.rb:93:in `build_asset'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/base.rb:287:in `find_asset'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/index.rb:61:in `find_asset'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:211:in `block in find_asset'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:257:in `benchmark'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:210:in `find_asset'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:119:in `block in compile'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:118:in `each'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:118:in `compile'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.0/lib/sprockets/rails/task.rb:60:in `block (3 levels) in define'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/rake/sprocketstask.rb:146:in `with_logger'
   /tmp/build_2d5im50v1anke/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.0/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/Rails app
4

1 回答 1

0

似乎您在第 423 行的 app/assets/javascripts/application.js 中有语法错误。它说错误是 # 符号。删除它并重试。

于 2013-07-16T19:39:13.593 回答