Shopify / dashing

The exceptionally handsome dashboard framework in Ruby and Coffeescript.
http://shopify.github.com/dashing/
MIT License
10.98k stars 1.18k forks source link

Getting Started: dashing start shows execjs: Could not find a JavaScript runtime #279

Open martinseener opened 10 years ago

martinseener commented 10 years ago

Iam using Debian Squeeze (latest), installed latest RVM and Ruby 1.9.3-p362 on it. Then run through the Getting Started Guide. While running "dashing start" it throwed me the error below. After adding gem 'execjs' and gem 'therubyracer' to the Gemfile and bundle afterwards, i was able to successfully run dashing start then.

Error thrown: /usr/local/rvm/gems/ruby-1.9.3-p362/gems/execjs-2.0.2/lib/execjs/runtimes.rb:51:in autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) from /usr/local/rvm/gems/ruby-1.9.3-p362/gems/execjs-2.0.2/lib/execjs.rb:5:inmodule:ExecJS' from /usr/local/rvm/gems/ruby-1.9.3-p362/gems/execjs-2.0.2/lib/execjs.rb:4:in <top (required)>' from /usr/local/rvm/gems/ruby-1.9.3-p362/gems/backports-3.3.5/lib/backports/tools.rb:328:inrequire' from /usr/local/rvm/gems/ruby-1.9.3-p362/gems/backports-3.3.5/lib/backports/tools.rb:328:in require_with_backports' from /usr/local/rvm/gems/ruby-1.9.3-p362/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in<top (required)>' from /usr/local/rvm/gems/ruby-1.9.3-p362/gems/backports-3.3.5/lib/backports/tools.rb:328:in require' from /usr/local/rvm/gems/ruby-1.9.3-p362/gems/backports-3.3.5/lib/backports/tools.rb:328:inrequire_with_backports' from /usr/local/rvm/gems/ruby-1.9.3-p362/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in <top (required)>' from /usr/local/rvm/gems/ruby-1.9.3-p362/gems/backports-3.3.5/lib/backports/tools.rb:328:inrequire' from /usr/local/rvm/gems/ruby-1.9.3-p362/gems/backports-3.3.5/lib/backports/tools.rb:328:in require_with_backports' from /usr/local/rvm/gems/ruby-1.9.3-p362/gems/dashing-1.3.2/lib/dashing.rb:5:in<top (required)>' from config.ru:1:in require' from config.ru:1:inblock in

' from /usr/local/rvm/gems/ruby-1.9.3-p362/gems/rack-1.5.2/lib/rack/builder.rb:55:in instance_eval' from /usr/local/rvm/gems/ruby-1.9.3-p362/gems/rack-1.5.2/lib/rack/builder.rb:55:ininitialize' from config.ru:1:in new' from config.ru:1:in
' from /usr/local/rvm/gems/ruby-1.9.3-p362/gems/thin-1.6.1/lib/rack/adapter/loader.rb:33:in eval' from /usr/local/rvm/gems/ruby-1.9.3-p362/gems/thin-1.6.1/lib/rack/adapter/loader.rb:33:inload' from /usr/local/rvm/gems/ruby-1.9.3-p362/gems/thin-1.6.1/lib/thin/controllers/controller.rb:182:in load_rackup_config' from /usr/local/rvm/gems/ruby-1.9.3-p362/gems/thin-1.6.1/lib/thin/controllers/controller.rb:72:instart' from /usr/local/rvm/gems/ruby-1.9.3-p362/gems/thin-1.6.1/lib/thin/runner.rb:200:in run_command' from /usr/local/rvm/gems/ruby-1.9.3-p362/gems/thin-1.6.1/lib/thin/runner.rb:156:inrun!' from /usr/local/rvm/gems/ruby-1.9.3-p362/gems/thin-1.6.1/bin/thin:6:in <top (required)>' from /usr/local/rvm/gems/ruby-1.9.3-p362/bin/thin:19:inload' from /usr/local/rvm/gems/ruby-1.9.3-p362/bin/thin:19:in <main>' from /usr/local/rvm/gems/ruby-1.9.3-p362/bin/ruby_executable_hooks:15:ineval' from /usr/local/rvm/gems/ruby-1.9.3-p362/bin/ruby_executable_hooks:15:in `
'

bdeak commented 10 years ago

For me, on ubuntu, this resolved this condition:

sudo apt-get instal nodejs
martinseener commented 10 years ago

But i think neither your nor my solution is the best one and its kind of a bug. hopefully one of the developers will fix that also because nodejs is not a package in wheezy nor squeeze which would make your solution only a ubuntu workaround.

mbainrot commented 10 years ago

This is still happening, though there appears to be a fairly easy way of adding nodejs to the aptitude package editor.

https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager

syardumi commented 9 years ago

sudo apt-get instal nodejs

worked for me too. Thanks!

mario-areias commented 8 years ago

The solution proposed by @martinseener is much better than install node. Add the gem is quicker and lighter than install an entire platform only to fix that issue.