Heroku 推送带有 1 张图片的拒绝静态页面

Heroku push Rejected static page with 1 image

您好,我制作了一个包含 1 张图片的静态页面来测试使用 heroku 作为托管网站的网站,当我尝试推送到主机时它拒绝了我这样做

这是显示的错误

Running: rake assets:precompile
remote:        rake aborted!
remote:        ExecJS::ProgramError: Unexpected token: operator (=) (line: 13, col: 0, pos: 583)
remote:        Error
remote:        at new JS_Parse_Error (/tmp/execjs20151026-699-1gsek0zjs:2359:10623)
remote:        at js_error (/tmp/execjs20151026-699-1gsek0zjs:2359:10842)
remote:        at croak (/tmp/execjs20151026-699-1gsek0zjs:2359:19086)
remote:        at token_error (/tmp/execjs20151026-699-1gsek0zjs:2359:19223)
remote:        at unexpected (/tmp/execjs20151026-699-1gsek0zjs:2359:19311)
remote:        at expr_atom (/tmp/execjs20151026-699-1gsek0zjs:2359:27526)
remote:        at maybe_unary (/tmp/execjs20151026-699-1gsek0zjs:2359:30019)
remote:        at expr_ops (/tmp/execjs20151026-699-1gsek0zjs:2359:30777)
remote:        at maybe_conditional (/tmp/execjs20151026-699-1gsek0zjs:2359:30869)
remote:        at maybe_assign (/tmp/execjs20151026-699-1gsek0zjs:2359:31312)new JS_Parse_Error ((execjs):2359:10623)
remote:        js_error ((execjs):2359:10842)
remote:        croak ((execjs):2359:19086)
remote:        token_error ((execjs):2359:19223)
remote:        unexpected ((execjs):2359:19311)
remote:        expr_atom ((execjs):2359:27526)
remote:        maybe_unary ((execjs):2359:30019)
remote:        expr_ops ((execjs):2359:30777)
remote:        maybe_conditional ((execjs):2359:30869)
remote:        maybe_assign ((execjs):2359:31312)
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/execjs-2.5.2/lib/execjs/external_runtime.rb:39:in `exec'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/execjs-2.5.2/lib/execjs/external_runtime.rb:21:in `eval'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/execjs-2.5.2/lib/execjs/external_runtime.rb:46:in `call'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/uglifier-2.7.1/lib/uglifier.rb:212:in `run_uglifyjs'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/uglifier-2.7.1/lib/uglifier.rb:179:in `compile'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/uglifier_compressor.rb:52:in `call'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/uglifier_compressor.rb:28:in `call'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:75:in `call_processor'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:56:in `reverse_each'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:56:in `call_processors'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:86:in `load_asset_by_uri'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:45:in `block in load'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:155:in `fetch_asset_from_dependency_cache'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:38:in `load'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:20:in `block in initialize'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:47:in `yield'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:47:in `load'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/base.rb:63:in `find_asset'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/base.rb:70:in `find_all_linked_assets'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/manifest.rb:138:in `block in find'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:223:in `block in stat_tree'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:207:in `block in stat_directory'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:204:in `each'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:204:in `stat_directory'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:222:in `stat_tree'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:105:in `each'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:105:in `block in logical_paths'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:104:in `each'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:104:in `logical_paths'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/manifest.rb:136:in `find'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/sprockets/manifest.rb:162:in `compile'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.1/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-3.2.0/lib/rake/sprocketstask.rb:147:in `with_logger'
remote:        /tmp/build_fa4eeb92038e2b2e9fcac15239510acd/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.1/lib/sprockets/rails/task.rb:69:in `block (2 levels) in define'
remote:        Tasks: TOP => assets:precompile
remote:        (See full trace by running task with --trace)
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote: 
remote:  !     Push rejected, failed to compile Ruby app
remote: 
remote: Verifying deploy...
remote: 
remote: !   Push rejected to a.
remote: 
To https://git.heroku.com/a.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/a.git'

每次我再试一次,即使我加了力,它仍然会出错 我有点不知所措,因为它只是一个基本的静态页面,但我什至无法将它放入 heroku 的服务器中......任何帮助都会非常感激..

只是一个包含 1 张图片的静态页面

您应该尝试使用 rake assets:precompile 在本地进行调试。

它会给你错误所在的文件(可能是javascript或app/assets/javascripts下的coffescript文件)