Unable to start PAT Local Server
There are several of us at my firm that have been unable to initiate the Parametric Analysis Tool local server for the past 1-2 months. We have never had an issue with the tool prior to this.
I have worked through every step in this post to no avail: What do I do about a "Server Error" in PAT 2.0.0?
We are all receiving the following error from the rails.log file: "/Applications/OpenStudio-2.9.1/ParametricAnalysisTool.app/Contents/Resources/OpenStudio-server/gems/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect': Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)"
We are all using Apple MacBooks and have replicated this issue on at least OS V2.7, 2.8, 2.9, & 2.9.1. The sudden onset makes me think this is associated with an update or change to the Apple JavaScriptCore .
Any assistance would be much appreciated.
Can you try OpenStudio v3.0, which was just recently released?
Same result with V3.0.
Could you run this in a terminal (you may need to install execjs gem) ruby -r execjs -e 'puts ExecJS.runtime.name'
On my machine, I get the following output.
Tims-MBP-2:~ tijcolem$ ruby -r execjs -e 'puts ExecJS.runtime.name' Node.js (V8)
If you get the same error as PAT, you could try and install node.js. If you have homebrew you can do install it via
brew install node
or you can just download the installer https://nodejs.org/en/download/.Not sure if that'll fix it. It may also be due to some security restrictions preventing PAT from exec on the JavaScriptVM.
After doing some investigative work, it appears the issue comes about after upgrading to macOS Catalina. The PAT still works fine in all earlier macOS versions.
I get the following message when I run that line item in Terminal: 1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
require' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
require': cannot load such file -- execjs (LoadError)I tried installing node.js with no success
It appears an issue had already been opened up about this. https://github.com/rails/execjs/issue... Hopefully, it'll be addressed in the next release.