uglifier icon indicating copy to clipboard operation
uglifier copied to clipboard

Compiling fails with js.erb embedded ruby

Open gartlandj opened this issue 6 years ago • 1 comments

I have multiple js.erb files with embedded ruby, and they all fail when hitting the ruby tags. The error I get is the following: app/assets/javascripts/training/training_common.js.erb ExecJS::ProgramError: Unexpected token: operator (<) (line: 11, col: 0, pos: 212)

In this file at line 11 I have <% environment.context_class.instance_eval { include Rails.application.routes.url_helpers } %>;

Everything around this line looks fine, and since it is occurring in all my files with embedded ruby, I think it is related to these ruby tags themselves. Is there something I need to include to make sure make sure Uglifier succeeds with erb?

Thanks!

gartlandj avatar Aug 09 '18 20:08 gartlandj

@gartlandj Were you able to resolve this issue. I am currently experiencing it.

segunadeleye avatar Nov 27 '18 10:11 segunadeleye