Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
If you're on Ubuntu, install nodejs
sudo apt-get install nodejs
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.
i use this gems on Dreamhost with Rails 3.1 for the Asset Pipeline
group :assets do
gem 'execjs'
gem 'therubyracer', :platforms => :ruby
gem 'johnson'
gem 'sass-rails', " ~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end
therubyracer as precompiler, and johnson as runtime.
This work for me in 2 Rails 3.1 apps hosted by Dreamhost.