Rake aborted!

304 views
Skip to first unread message

braini...@gmail.com

unread,
Mar 10, 2019, 12:45:32 PM3/10/19
to Ruby on Rails: Talk
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)

Hassan Schroeder

unread,
Mar 10, 2019, 1:10:22 PM3/10/19
to rubyonrails-talk
On Sun, Mar 10, 2019 at 9:45 AM <braini...@gmail.com> wrote:

> 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?

> rake aborted!
> ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.

Did you follow the link in the message?

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

braini...@gmail.com

unread,
Mar 10, 2019, 1:21:45 PM3/10/19
to Ruby on Rails: Talk
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 

Walter Lee Davis

unread,
Mar 10, 2019, 1:27:30 PM3/10/19
to rubyonra...@googlegroups.com
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
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c9b83824-b33c-4645-ba0b-84ec0d799494%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

braini...@gmail.com

unread,
Mar 10, 2019, 1:35:50 PM3/10/19
to Ruby on Rails: Talk
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. 

Colin Law

unread,
Mar 10, 2019, 4:04:21 PM3/10/19
to Ruby on Rails: Talk
On Sun, 10 Mar 2019 at 17:35, <braini...@gmail.com> wrote:
>
> 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
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/462f08c9-c75c-4d7c-9b0f-2c4674b45328%40googlegroups.com.

braini...@gmail.com

unread,
Mar 10, 2019, 4:29:56 PM3/10/19
to Ruby on Rails: Talk
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,

Colin Law

unread,
Mar 10, 2019, 5:57:48 PM3/10/19
to Ruby on Rails: Talk
On Sun, 10 Mar 2019 at 20:30, <braini...@gmail.com> wrote:
>
> 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
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4028b458-ae0c-485c-bd4d-9761b0b6828b%40googlegroups.com.

braini...@gmail.com

unread,
Mar 10, 2019, 6:02:00 PM3/10/19
to Ruby on Rails: Talk
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
Reply all
Reply to author
Forward
0 new messages