因JQuery问题推送到Heroku

时间:2014-05-23 20:07:56

标签: jquery ruby-on-rails heroku stripe-payments

我试图在heroku上更新我的应用,但收到错误。一切都在当地很好用,并且在过去没有遇到任何麻烦。

这是我在终端中收到的错误输出:

Running: rake assets:precompile
   I, [2014-05-23T19:57:06.803597 #1447]  INFO -- : Writing /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/public/assets/Rave-76af238e2f8042f0df74239e340676aa.jpg
   I, [2014-05-23T19:57:06.805675 #1447]  INFO -- : Writing /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/public/assets/social-dccb3b82dfc09e0f163a4ae48f971508.png
   I, [2014-05-23T19:57:06.810665 #1447]  INFO -- : Writing /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/public/assets/tables-a706161a3475c7eb419119162d0da280.jpg
   rake aborted!
   ExecJS::ProgramError: Unexpected token: string (formatCardNumber) (line: 13889, col: 33, pos: 390151)
   Error
   at new JS_Parse_Error (/tmp/execjs20140523-1447-8yjrbp.js:2357:10754)
   at js_error (/tmp/execjs20140523-1447-8yjrbp.js:2357:10973)
   at croak (/tmp/execjs20140523-1447-8yjrbp.js:2357:19198)
   at token_error (/tmp/execjs20140523-1447-8yjrbp.js:2357:19335)
   at unexpected (/tmp/execjs20140523-1447-8yjrbp.js:2357:19423)
   at semicolon (/tmp/execjs20140523-1447-8yjrbp.js:2357:19896)
   at simple_statement (/tmp/execjs20140523-1447-8yjrbp.js:2357:22669)
   at /tmp/execjs20140523-1447-8yjrbp.js:2357:20665
   at /tmp/execjs20140523-1447-8yjrbp.js:2357:20069
   at block_ (/tmp/execjs20140523-1447-8yjrbp.js:2357:24688)
   (in /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/app/assets/javascripts/application.js)/tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/execjs-2.0.2/lib/execjs/external_runtime.rb:68:in `extract_result'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/execjs-2.0.2/lib/execjs/external_runtime.rb:28:in `block in exec'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/execjs-2.0.2/lib/execjs/external_runtime.rb:41:in `compile_to_tempfile'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/execjs-2.0.2/lib/execjs/external_runtime.rb:27:in `exec'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/uglifier-2.5.0/lib/uglifier.rb:186:in `really_compile'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/uglifier-2.5.0/lib/uglifier.rb:110:in `compile'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/uglifier_compressor.rb:25:in `evaluate'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/context.rb:197:in `block in evaluate'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/context.rb:194:in `each'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/context.rb:194:in `evaluate'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/bundled_asset.rb:25:in `initialize'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:377:in `new'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:377:in `build_asset'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:94:in `block in build_asset'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/caching.rb:58:in `cache_asset'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:93:in `build_asset'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:287:in `find_asset'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:61:in `find_asset'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:211:in `block in find_asset'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:257:in `benchmark'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:210:in `find_asset'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:119:in `block in compile'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:118:in `each'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:118:in `compile'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/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_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/rake/sprocketstask.rb:146:in `with_logger'
   /tmp/build_9c1d18a8-5bbf-41e8-ad98-48e938516c9f/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:59:in `block (2 levels) in define'

我很好奇这是否与我的payment.js文件有关。这是我的应用程序中唯一拥有的格式卡' FormatCardNumber'引用。 heroku没有消化这个Jquery吗?

1 个答案:

答案 0 :(得分:3)

尝试清理资产,然后预编译:

rake assets:clean

然后预编译:

RAILS_ENV=production bundle exec rake assets:precompile

然后添加-A,commit,并推送到heroku。

git add -A
git commit -m "Precompiled assets"
git push heroku master