I've used rvm to install rails..no problems.
Created a new app successfully
Running bundle install without issues.
Although, trying to run any command further (rails s, rails g controller.., etc)
I'm getting this error
/home/USER/.rvm/gems/ruby-1.9.2-p290/gems/execjs-1.2.9/lib/execjs /runtimes.rb:47:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
I'm assuming there's an issue with a gem but I'm really clueless on what happened and can't seem to find anything that addresses this issue
This happens when your ubuntu installation does not have a javascript runtime installed.
Try:
sudo apt-get install nodejs
I had the best experience with using therubyracer on Ubuntu / Xubuntu (this is the Google V8 runtime) and Node.js in Windows. So basically yes, just adding
gem 'therubyracer'
to your Gemfile and running bundle install is enough. Node.js is not required.
Also take a look at: https://github.com/sstephenson/execjs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With