无法将应用程序推送到heroku

时间:2013-07-16 17:37:07

标签: heroku ruby-on-rails-4

当我尝试将git推送到heroku时,这是我得到的错误。我刚刚创建了一个非常简单的脚手架并添加了一些javascript。这只是一个小小的世界节目。对于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

1 个答案:

答案 0 :(得分:0)

好像你在第423行的app / assets / javascripts / application.js中有语法错误。它说错误是#符号。删除它,然后再试一次。