ExecJS and could not find a JavaScript runtime
Ubuntu Users
I'm on Ubuntu 11.04 and had similar issues. Installing Node.js fixed it.
As of Ubuntu 13.04 x64 you only need to run:
sudo apt-get install nodejs
This will solve the problem.
CentOS/RedHat Users
sudo yum install nodejs
Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
I force gem execjs to down to 2.7.0 since 2.8.1, it's works...
Rails: Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
libv8
is an OS library; you'll need to install the correct Linux system library. If you're running Ubuntu, it's
sudo apt-get install libv8-dev
Alternatively, you can install node.js
which is available as a Debian/Ubuntu package for various distros, e.g. http://ppa.launchpad.net/chris-lea/node.js/ubuntu
You may save yourself a lot of trouble by deploying on Heroku instead where you don't have to manage the OS or components for gems.
Rails - Could not find a JavaScript runtime?
Installing a javascript runtime library such as nodejs solves this
To install nodejs on ubuntu, you can type the following command in the terminal:
sudo apt-get install nodejs
To install nodejs on systems using yum, type the following in the terminal:
yum -y install nodejs
Related Topics
How to Serialize an Object Using Tcpserver Inside
Encoding::Undefinedconversionerror: "\Xe4" from Ascii-8Bit to Utf-8
How to More Elegantly Remove Duplicate Items Across All Elements of a Ruby Array
Call Ruby Script from Powershell
Failure: Expected 0 to Be >= 1 on Ruby on Rails
What Is Difference Between "P" and "Pp"
Rails "Action" Params Key Conflict
Escaping Apostrophes Using Gsub
How to Include Blank Field in Select_Tag
How to Use Same Browser Window for Automated Test Using Selenium-Webdriver (Ruby)
Difference Between Lambda and -> Operator in Ruby
Param Is Missing or the Value Is Empty
Axlsx Merge Cells Inside a Style
Ruby If VS End of the Line If Behave Differently