Rake aborted!

Hi Everyone,

Now that the bundle install has run successfully I have run into the following error while running rake db:create. Does anyone have any ideas how to resolve the issue?

Thanks,

rake aborted!
ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in autodetect' /var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:5:in module:ExecJS
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:4:in <top (required)>' /var/lib/gems/2.3.0/gems/uglifier-4.1.20/lib/uglifier.rb:5:in require’
/var/lib/gems/2.3.0/gems/uglifier-4.1.20/lib/uglifier.rb:5:in <top (required)>' /home/nessnipes/webapp/config/application.rb:7:in <top (required)>’
/home/nessnipes/webapp/Rakefile:4:in <top (required)>' /var/lib/gems/2.3.0/gems/rake-12.3.2/exe/rake:27:in <top (required)>’
(See full trace by running task with --trace)

Did you follow the link in the message?

Yes I did. Where I was thrown off is in trying to understand what the literal issue is so I could resolve it as my understanding was if there were any outstanding issues with the app it wouldnt bundle I assumed the issue to be OS related. I

Correct. Your server does not have a JavaScript interpreter available at the command line. These days, I just install whatever version of NodeJS is in the package manager for that server. If you want to avoid any server dependencies, you can just add therubyracer to your Gemfile and bundle on the server will install that. That's a JS interpreter written entirely in vanilla Ruby.

Walter

Thank you Walter and Hasan. The gem is actually in the gem file but this occurred in development on my desktop so my guess would be I would need to install it there.

Thank you Walter and Hasan. The gem is actually in the gem file but this occurred in development on my desktop so my guess would be I would need to install it there.

If therubyracer is in your Gemfile then that should be enough.

Colin

Hi Colin,

I am not sure but I think the issue is that it is running on a desktop right now rather than on a webserver.

Thanks,

Hi Colin,

I am not sure but I think the issue is that it is running on a desktop right now rather than on a webserver.

Shouldn't make any difference, provided you have run bundle install on
the desktop. Nowadays I do use nodejs but I used to use therubyracer.
You could post your Gemfile here for us to see.
Alternatively you could just install nodejs. If this is a Debian based
system (Ubuntu for example) then you can run
sudo apt-get install nodejs
and then I think you can remove therubyracer.

Colin

I installed NodeJs and it worked like a charm. Thank you Colin, Walter and everyone. The only issue I have now appears to be Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’. It never ends. LOL

n Sunday, March 10, 2019 at 5:57:48 PM UTC-4, Colin Law wrote: