A
A
Andrey2017-11-23 03:46:57
Ruby on Rails
Andrey, 2017-11-23 03:46:57

How to fix rake assets:precompile errors?

I'm trying to make a team

RAILS_ENV=production bundle exec rake assets:precompile

While doing this I get an error:
ExecJS::ProgramError: Unexpected token: operator (>) (line: 48027, col: 50, pos: 1986183)

Error
    at new JS_Parse_Error (<eval>:2357:10748)
    at js_error (<eval>:2357:10967)
    at croak (<eval>:2357:19192)
    at token_error (<eval>:2357:19329)
    at unexpected (<eval>:2357:19417)
    at expr_atom (<eval>:2357:27609)
    at maybe_unary (<eval>:2357:30102)
    at expr_ops (<eval>:2357:30860)
    at maybe_conditional (<eval>:2357:30952)
    at maybe_assign (<eval>:2357:31395)
    at maybe_assign (<eval>:2357:31569)
    at expression (<eval>:2357:31708)
    at expr_list (<eval>:2357:27913)
    at subscripts (<eval>:2357:29811)
  (in /home/parts-soft/www/parts-soft/releases/20171122232617/apps/www/app/assets/javascripts/application.js)
new JS_Parse_Error ((execjs):2357:10748)
js_error ((execjs):2357:10967)
croak ((execjs):2357:19192)
token_error ((execjs):2357:19329)
unexpected ((execjs):2357:19417)
expr_atom ((execjs):2357:27609)
maybe_unary ((execjs):2357:30102)
expr_ops ((execjs):2357:30860)
maybe_conditional ((execjs):2357:30952)
maybe_assign ((execjs):2357:31395)
maybe_assign ((execjs):2357:31569)
expression ((execjs):2357:31708)
expr_list ((execjs):2357:27913)
subscripts ((execjs):2357:29811)
/home/parts-soft/.rvm/gems/[email protected]/gems/execjs-2.6.0/lib/execjs/ruby_racer_runtime.rb:36:in `rescue in block in eval'
/home/parts-soft/.rvm/gems/[email protected]/gems/execjs-2.6.0/lib/execjs/ruby_racer_runtime.rb:33:in `block in eval'
/home/parts-soft/.rvm/gems/[email protected]/gems/execjs-2.6.0/lib/execjs/ruby_racer_runtime.rb:75:in `block in lock'

When I do
RAILS_ENV=production bundle exec rake assets:precompile:all

Sprockets::FileNotFound: couldn't find file 'handlebars.runtime'
  (in /home/oil/www/oil/releases/20171122232617/apps/www/app/assets/javascripts/application.js:32)

The error is displayed in more detail.
What can be done in this situation? What is the problem I can't understand?
In general, these files were not touched.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vsuhachev, 2017-11-27
@vsuhachev

I treated similar strange problems by installing nodejs on the development environment (now you have therubyracer as a js engine)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question