2014-05-23 3 views
0

heroku에서 내 앱을 업데이트하려고하는데 오류가 발생했습니다. 모든 것이 현지에서 잘 작동하며 과거에는 문제가 없었습니다.JQuery로 인해 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'참조 된 내 응용 프로그램에서 유일한 장소입니다. 영웅이이 Jquery를 소화하지 않았습니까?

+0

자산을 로컬에서 컴파일 해 보았습니까? RAILS_ENV = 프로덕션 번들 exec rake assets : precompile' 파일을 커밋 한 다음 heroku에 밀어 넣습니다. – ChrisBarthol

+0

작동했지만 내 이미지가 사이트 (배경 및 로고)로 옮겨지지 않았습니다. 어떻게 이동합니까? – Webbr88

+0

그들은 자동으로 컴파일되어야합니다. app/assets/images가 아닌 다른 곳에 저장하고 있습니까? – ChrisBarthol

답변

3

시도는 사전 컴파일 자산을 청소하기 :

rake assets:clean 

을 다음 사전 컴파일 :

RAILS_ENV=production bundle exec rake assets:precompile 

그런 다음 -A를 추가 투입하고, Heroku가에 밀어 넣습니다.

git add -A 
git commit -m "Precompiled assets" 
git push heroku master 
관련 문제