I’ve been getting into ruby on rails but I’ve had lots of problems with “runtimeerror”
I’ve tried installing more than once but still I can’t fix the problem, I’ve searched for more times that I would’ve liked and still nothing.
Each time I try to do a simple hello world (simple app) I get runtime error.
For example if I try to do : rails server, or gem ‘therubyracer’, etc. I will get runtimeerror. I have no idea what the problem might be; here’s the errors I’ve been getting:
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
ERROR: While executing gem ... (RuntimeError)
Unknown command therubyracer
I hope you guys can help me out to fix this so I can move on and start programming 🙂 thanks in advance!
By the way this are my versions of everything I’m currently using :
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
rvm 1.15.9 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
Rails 3.2.8
Edit, maybe I should note that I followed this tutorial to install RoR: https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm
gem 'therubyracer'goes in your Gemfile, not your shell. Be sure tobundle installafter changing your Gemfile too.