Heroku Deploy错误eof(未定义)在/app/app/assets/javascripts/application.js中

时间:2014-06-13 10:27:57

标签: javascript ruby-on-rails heroku eof

相同error,不同的问题......
这是我第一次部署,与tuto(实用工作室)合作。该应用程序在本地工作正常。

但是当我将我的应用程序部署到Heroku时。我在日志中遇到此错误:

-----> Preparing app for Rails asset pipeline
          Running: rake assets:precompile
          rake aborted!
          ExecJS::ProgramError: Unexpected token: eof (undefined) (line: 10754, col: 0, pos: 299145)
          Error
          at new JS_Parse_Error (/tmp/execjs20140613-1094-180xlm9js:2357:10754)
          at js_error (/tmp/execjs20140613-1094-180xlm9js:2357:10973)
          at croak (/tmp/execjs20140613-1094-180xlm9js:2357:19198)
          at token_error (/tmp/execjs20140613-1094-180xlm9js:2357:19335)
          at unexpected (/tmp/execjs20140613-1094-180xlm9js:2357:19423)
          at as_name (/tmp/execjs20140613-1094-180xlm9js:2357:29065)
          at /tmp/execjs20140613-1094-180xlm9js:2357:29514
          at /tmp/execjs20140613-1094-180xlm9js:2357:27576
          at /tmp/execjs20140613-1094-180xlm9js:2357:30108
          at expr_ops (/tmp/execjs20140613-1094-180xlm9js:2357:30866)
          (in /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/app/assets/javascripts/application.js)/tmp/build_87be0d5e-25c
   3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/execjs-2.2.0/lib/execjs/external_runtime.rb:64:in `extract_result
   '
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/execjs-2.2.0/lib/execjs/external_ru
   ntime.rb:29:in `exec'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/uglifier-2.5.0/lib/uglifier.rb:186:
   in `really_compile'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/uglifier-2.5.0/lib/uglifier.rb:110:
   in `compile'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/sprockets-2.11.0/lib/sprockets/ugli
   fier_compressor.rb:25:in `evaluate'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/tilt-1.4.1/lib/tilt/template.rb:103
   :in `render'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/sprockets-2.11.0/lib/sprockets/cont
   ext.rb:197:in `block in evaluate'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/sprockets-2.11.0/lib/sprockets/cont
   ext.rb:194:in `each'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/sprockets-2.11.0/lib/sprockets/cont
   ext.rb:194:in `evaluate'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/sprockets-2.11.0/lib/sprockets/bund
   led_asset.rb:25:in `initialize'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/sprockets-2.11.0/lib/sprockets/base
   .rb:377:in `new'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/sprockets-2.11.0/lib/sprockets/base
   .rb:377:in `build_asset'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/sprockets-2.11.0/lib/sprockets/inde
   x.rb:94:in `block in build_asset'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/sprockets-2.11.0/lib/sprockets/cach
   ing.rb:58:in `cache_asset'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/sprockets-2.11.0/lib/sprockets/inde
   x.rb:93:in `build_asset'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/sprockets-2.11.0/lib/sprockets/base
   .rb:287:in `find_asset'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/sprockets-2.11.0/lib/sprockets/inde
   x.rb:61:in `find_asset'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/sprockets-2.11.0/lib/sprockets/mani
   fest.rb:211:in `block in find_asset'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/sprockets-2.11.0/lib/sprockets/mani
   fest.rb:257:in `benchmark'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/sprockets-2.11.0/lib/sprockets/mani
   fest.rb:210:in `find_asset'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/sprockets-2.11.0/lib/sprockets/mani
   fest.rb:119:in `block in compile'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/sprockets-2.11.0/lib/sprockets/mani
   fest.rb:118:in `each'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/sprockets-2.11.0/lib/sprockets/mani
   fest.rb:118:in `compile'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/sprockets-rails-2.0.1/lib/sprockets
   /rails/task.rb:60:in `block (3 levels) in define'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/gems/sprockets-2.11.0/lib/rake/sprockets
   task.rb:146:in `with_logger'
          /tmp/build_87be0d5e-25c3-4e93-8bf1-c6428f2f8032/vendor/bundle/ruby/1.9.1/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

我的application.js看起来像:

//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .

我的production.rb看起来像:

config.serve_static_assets = true

config.assets.js_compressor = :uglifier

config.assets.compile = true

config.assets.digest = true

我的database.yml:

production:
  adapter: sqlite3
  database: db/production.sqlite3
  pool: 5
  timeout: 5000

我的文件夹app / assets / js中只有3个文件 - application.js(见上文) - events.js.coffee(只有评论) - Registrations.js.coffee(仅评论)

我觉得我的第一个晚上的性爱失败了:( 有什么想法吗?

0 个答案:

没有答案