Monday 15 June 2015

javascript - git: ExecJS::ProgramError: Unexpected token: name (jquery) when push to production environment -



javascript - git: ExecJS::ProgramError: Unexpected token: name (jquery) when push to production environment -

i've tried git push hosting service (not heroku). typed next commands on windows.

rake assets:precompile git add together . git commit -m "xxx" git force origin master

then next error displayed on hosting service screen.

i, [2014-11-08t09:28:48.280141 #22295] info -- : writing /var/repos/xxx/xxx/public/assets/noimage-9f9de98ce95d5c9108e75feb33a04e35.gif rake aborted! execjs::programerror: unexpected token: name (jquery) (line: 12946, col: 8, pos: 364216) error @ new js_parse_error (<eval>:2316:10736) @ js_error (<eval>:2316:10955) @ croak (<eval>:2316:18665) @ token_error (<eval>:2316:18802) @ unexpected (<eval>:2316:18890) @ semicolon (<eval>:2316:19363) @ simple_statement (<eval>:2316:21849) @ <eval>:2316:20090 @ <eval>:2316:19536 @ <eval>:2316:31209 (in /var/repos/xxx/xxx/app/assets/javascripts/application.js)/var/repos/xxx/xxx/vendor/bundle/ruby/2.1.0/gems/execjs-2.0.2/lib/execjs/ruby_racer_runtime.rb:34:in `rescue in block in eval' /var/repos/xxx/xxx/vendor/bundle/ruby/2.1.0/gems/execjs-2.0.2/lib/execjs/ruby_racer_runtime.rb:28:in `block in eval' /var/repos/xxx/xxx/vendor/bundle/ruby/2.1.0/gems/execjs-2.0.2/lib/execjs/ruby_racer_runtime.rb:80:in `block in lock' /var/repos/xxx/xxx/vendor/bundle/ruby/2.1.0/gems/therubyracer-0.10.2/lib/v8/c/locker.rb:13:in `locker' /var/repos/xxx/xxx/vendor/bundle/ruby/2.1.0/gems/execjs-2.0.2/lib/execjs/ruby_racer_runtime.rb:78:in `lock' /var/repos/xxx/xxx/vendor/bundle/ruby/2.1.0/gems/execjs-2.0.2/lib/execjs/ruby_racer_runtime.rb:27:in `eval' . . .

although there file name noimage-9f9de98ce95d5c9108e75feb33a04e35.gif on first line of error message, saved app\assets\images\noimage.gif locally.

does have error?

there files in \app\assets\javascripts.

application.js

// manifest file that'll compiled application.js, include files // listed below. // // javascript/coffee file within directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can referenced here using relative path. // // it's not advisable add together code straight here, if do, it'll appear @ bottom of // compiled file. // // read sprockets readme (https://github.com/sstephenson/sprockets#sprockets-directives) details // supported directives. // //= require jquery //= require jquery_ujs //= require bootstrap //= require turbolinks //= require_tree . require jquery.turbolinks

calendars.js.coffee

# place behaviors , hooks related matching controller here. # logic automatically available in application.js. # can utilize coffeescript in file: http://coffeescript.org/ $(document).ready( -> $('html, body').animate({ scrolltop: 0 }, 'slow') )

there other js.coffee files, don't have code below.

# place behaviors , hooks related matching controller here. # logic automatically available in application.js. # can utilize coffeescript in file: http://coffeescript.org/

how prepare problem?

i think noimage-9f9de98ce95d5c9108e75feb33a04e35.gif reddish herring--that's lastly successful log line before error.

that require statement @ end of application.js should have leading //=, believe. it's not valid js written.

javascript jquery ruby-on-rails git ruby-on-rails-4

No comments:

Post a Comment