How-To: Install Dradis-CE 3 on Ubuntu Server 16.04

@BillDietrich what directory are you in when you run the bundle install command? Try navigating into the dradis-ce folder, then run the command again:

$ cd dradis-ce/
$ bundle install

$ cd /opt/dradis-ce/

/opt/dradis-ce $ bundle install

Traceback (most recent call last):

2: from /usr/local/bin/bundle:23:in `<main>'

1: from /usr/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'

/usr/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe’: can’t find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)

/opt/dradis-ce $

Hello @BillDietrich, I think I’ve been able to reproduce your error, also in Mint 19.1:

I think we ended up with a newer version of bundler installed than the one used to generate the Gemfile.lock file in the repo, and they are not compatible.

I fixed this problem uninstalling the newer version of bundler:
cd /opt/dradis-ce
gem uninstall bundler

Then installing the same version as the Gemfile.lock in the git repo:
cd /opt/dradis-ce
gem install bundler -v 1.16.4

Note: I really had to use sudo all the time bc I did not have proper permissions set in /opt/dradis-ce

$ cd /opt/dradis-ce

/opt/dradis-ce $ sudo gem uninstall bundler
[sudo] password for user1:
Gem ‘bundler’ is not installed

/opt/dradis-ce $

I thought you had bundler installed: How-To: Install Dradis-CE 3 on Ubuntu Server 16.04 - #18 by BillDietrich

What about installing version 1.16.4 ?

$ cd /opt/dradis-ce

/opt/dradis-ce $ sudo gem install bundler -v 1.16.4

[sudo] password for user1:
Fetching: bundler-1.16.4.gem (100%)
Successfully installed bundler-1.16.4
1 gem installed

/opt/dradis-ce $ ruby bin/setup

== Enabling default add-ons ==
== Installing dependencies ==
The git source GitHub - dradis/dradis-calculator_cvss: A CVSSv3 score calculator for the Dradis Framework is not yet checked out. Please run bundle install before trying to start your application
Fetching GitHub - dradis/dradis-calculator_cvss: A CVSSv3 score calculator for the Dradis Framework
There was an error while trying to write to /home/user1/.bundle/cache/git. It is likely that you need to grant write permissions for that path.

== Command [“bundle install”] failed ==
/opt/dradis-ce $

Did:

sudo chmod 777 ~/.bundle

/opt/dradis-ce $ ruby bin/setup

It did a ton of fetches and installs, ending with:

Installing whenever 0.10.0
There was an error while trying to write to /opt/dradis-ce/Gemfile.lock. It is likely that you need to grant write permissions for that path.

== Command [“bundle install”] failed ==

@BillDietrich it looks like you have a whole lot of file permissions to deal with? Could you resolve those as they appear and then try again?

I followed this guide and was able to successfully deploy Dradis-CE but not very smoothly as the installation script was attempting to write the Methodology directory containing the owasp xml file to the root directory, I have Dradis installed in /opt/dradis-ce so when the installation script does …/…/ it reaches my root already, it never let me install due to write permissions and accordingly, I had to create a soft-link to link my methodology directory to /shared to be able to install, looking at the methodology path in my dashboard, it points to ./…/…/shared with is in root, how can I fix this path? also I attempted to install Snowcrash theme but it complains about the bundler as I am using version 5, can this theme be used in the latest community release of Dradis or it’s not supported anymore?

@zer0cool is there an option to install Dradis in another folder? (e.g. on the Desktop)

Also, can you clarify what’s happening here? Any specific error message you can share?

I fixed the installation issue by removing the …/…/ from line 46 dradis-ce/methodology.rb at 4ef85f0ea4c40884e9d581b6b57d18241e76ace7 · dradis/dradis-ce · GitHub

for the second issue, I will spin a test instance tomorrow and get the exact error as installing Snowcrash renders Dradis non-functional due to bundler conflict 4 and 5, as 5 is installed and the theme is predicting 4 and trying to satisfy the requirement by installing it.

Got the second issue too, the problem was due to an old version of rails utilized by the theme, dradis-theme_snowcrash/dradis-theme_snowcrash.gemspec at master · dradis/dradis-theme_snowcrash · GitHub (version 4.1.1) and accordingly trying to load the theme in a vanilla installation of Dradis will probably break it, I used RVM to install and older version of rails too and worked a treat, please consider pumping up the rails version on SnowCrash, it’s a really cool theme, cheers!