Questions tagged [execjs]

ExecJS lets you run JavaScript code from Ruby. It automatically picks the best runtime available to evaluate your JavaScript program, then returns the result to you as a Ruby object.

98 questions
1
vote
0 answers

ExecJS::RuntimeError on any page including coffeescript

ExecJS::RuntimeError in Users#index I'm getting an error like this on every single page of my app. Everything used to work... for some reason it isn't working now when I restarted my app. I am on Windows I have node already installed, tried adding…
K2xL
  • 9,730
  • 18
  • 64
  • 101
1
vote
2 answers

How to prevent cmd.exe to hit the network when using double slashes with cscript.exe?

Some background: In my Rails environment I'm using CoffeeScript which uses ExecJS which uses the Windows Scripting Host to execute Javascript files. Unfortunately I'm experiencing huge delays (> 30 seconds) when my CoffeeScript files are…
Daniel Rikowski
  • 71,375
  • 57
  • 251
  • 329
1
vote
3 answers

Rails 3.2.3 ExecJS::RuntimeError

I'm getting ExecJS::RuntimeError when i try to start Rails server and the server log gives me the following: ActionView::Template::Error (delete operand may not be argument or var (in…
Sergey Kishenin
  • 5,099
  • 3
  • 30
  • 50
1
vote
2 answers

Ruby on Rails: segmentation fault when running 'rake assets:precompile'

Since two days, I am not able to compile the javascript assets in my ruby on rails project anymore. If I do not run the precompile command, the same fault occurs when ruby is compiling the assets at runtime. The 'rake assets:precompile' command…
Jos
  • 1,015
  • 2
  • 13
  • 25
0
votes
0 answers

Problems with using execjs

I use execjs call js error execjs._exceptions.ProcessExitedWithNonZeroStatus: (101, '', "/var/folders/wd/2zd15m2d79j00 Executing with VSCode has no problems, but executing with pycharm has errors. I have installed node version 18. There is no…
0
votes
1 answer

Rails on Docker won't start - execjs does not find JavaScript runtime (node)

I am building a docker version of my rails 6.1.3.1 app. The original app runs fine on Ubuntu 20.04.2 with Node and I took the setup roughly from there. In Docker, Node installs fine via NVM but unfortunately Rails does not find it at startup. It…
0
votes
0 answers

Why does it appear a window in a flash when I use "call" in execjs, python?

I'm sure the problem happens here: self.js_fun.call('myfunc') and I have initialized js_fun: self.js_fun = execjs.compile(f.read()) just as the title, there will always be a sudden window as it executes, and disappeared as fast as a HK…
jljljl
  • 1
0
votes
0 answers

ExecJS::RuntimeError using await Unexpected token (48:10)

I am getting a error ExecJS::RuntimeError Unexpected token (48:10) when using await. > 48 | for await (let worksheet of wrksheets) { I am using Rails 5.2 and below are the relevant content of my Gemfile. I am trying this on my local machine…
opensource-developer
  • 2,826
  • 4
  • 38
  • 88
0
votes
1 answer

Q: How do you execute JavaScript library in RSpec?

I want to execute some JS library in RSpec. for example I can execute "Payment Library" of JavaScript Library in HTML like below.
Kouta Osabe
  • 121
  • 1
  • 10
0
votes
1 answer

Passenger + Ruby/ExecJS not finding NodeJS

I have a Ruby on Rails application deployed using capistrano on a server with ubuntu 16.04 + nginx + passenger5 + ruby 2.5.0 (via rbenv) + nodejs 9.4. For some unknown reason when I open the website passenger returns an error: There was an error…
Proz1g
  • 1,177
  • 4
  • 16
  • 36
0
votes
1 answer

Getting ExecJS when compiling rassets:precompile against production

So I am running into an odd issue. I cannot precompile assets on Rails 5 against production. I keep getting the same error message, irrespective if I precompile on the server itself or on my local environment. georg$ RAILS_ENV=production bundle…
0
votes
1 answer

windows - Ruby on Rails ExecJS::ProgramError

enter image description here I have a problem to run my ruby on rails simple blog. Can I solve this problem on Windows OS?
hyung jun yoo
  • 613
  • 6
  • 15
0
votes
0 answers

Trianglify.js generate backgrounds on server side (ruby)

I'm trying to generate triangle-pattern backgrounds server-side (ruby) using trianglify.js and gem 'therubyracer' (also tried execjs - same error) I use the following code require 'v8' cxt = V8::Context.new cxt.load('trianglify.js') png =…
Ilya Cherevkov
  • 1,743
  • 2
  • 17
  • 47
0
votes
1 answer

ExecJS Error when pushing to heroku

I have a rails app that I'm trying to push heroku but it fails each time with this message: ExecJS::RuntimeError: SyntaxError: Unexpected token: eof (undefined) (line: 14023, col: 0, pos: 385975) as well as some JS parsing errors. I have no idea…
tx291
  • 1,251
  • 6
  • 24
  • 42
0
votes
0 answers

heroku - could not find a javascript runtime

I am getting the following error message in the heroku logs when trying to access the application from the browser: Gem Load Error is: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. This…
Prakash Murthy
  • 12,923
  • 3
  • 46
  • 74