Problem with instructions on GitHub

Hello,

I’m using an Ubuntu machine.
I’ve tried to install Dradis through GitHub’s instructions:

$ git clone GitHub - dradis/dradis-legacy: This is a LEGACY repo head to
$ cd dradisframework/
$ git checkout dradis3_blackhat-arsenal (change for: git checkout master)
$ ruby bin/setup
$ bundle exec rails server

And I get an error:
/home/ubuntu/.rvm/gems/ruby-1.9.3-p551/gems/execjs-2.2.0/lib/execjs/runtimes.rb:51:in `autodetect’: Could not find a JavaScript runtime. See GitHub - sstephenson/execjs: Run JavaScript code from Ruby for a list of available runtimes. (ExecJS::RuntimeUnavailable)

How can I fix that?

Thanks!

Update: I’ve edit Gemfile to uncomment line 61: gem ‘execjs’. Then a bundle install, it worked temporarily. When I need to run “RAILS_ENV=production bundle exec thor dradis:reset” it stop.
Update 2: I’ve edit Gemfile to uncomment line 61 and line 62. It worked

Instead of checking out the dradis3_blackhat-arsenal branch which no longer exists, please use the release-3.0 branch.

Quick background info:

  • The execjs gem is required to compile the JS/CSS, this means converting from CoffeeScript and Sass to plain JS/CSS as well as merging multiple files into a single one. Before creating release packages we compile the assets so users don’t have to worry about that.

  • However, when running from the Git repo, you’ll default to run in Development mode, which means assets need to be compiled on the fly, and extjs needs to be available.

A solution would be to run the code from the Git repo, but in Production mode. This involves:

  1. Uncommenting extjs in Gemfile and: $ bundle install
  2. Running: $ bundle exec rake assets:precompile
  3. Running the server with: $ RAILS_EN=production bundle exec rails server