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

Thank you very much. It is now working for me.

Another question: Could you please let us know, how to configure ssl/ self signed certs for dradis in GNU/ Linux machines?

@ agreenbhm, Your contribution is really appreciated. Thank you very much.

I believe this was answered and resolved here: Secure Connection Failed. Wanted to leave the link here in case others come across this thread in the future!

Trying to install Dradis-CE on Linux Mint 19.1, and it’s failing. Did the following:

sudo apt-get install -y git redis-server ruby ruby-dev gcc make zlib1g-dev libsqlite3-dev libmysqlclient-dev g++

cd /opt

sudo git clone […]github.com/dradis/dradis-ce

cd /opt/dradis-ce

sudo ruby bin/setup

# got a couple of “can’t find gem bundler” errors, failed

# Support said do

sudo bundle install --path /opt/dradis-ce

# it failed, Gemfile not found, but that dir does contain a Gemfile

# and Support sends me to the community forum, I guess they can’t answer me

# tried “sudo bundle install --path /opt/dradis-ce” again today, get:
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:inactivate_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)
# same if I run it without the sudo

Hi @BillDietrich, don’t worry, we’ll help you out here! I just wanted to move this to the forum so that others who run into the same error can find the debugging.

Is this the first ruby app you’re launching on your local system? There are some dependencies that we just need to get running for you. That bundle install command is assuming that you have the bundler gem installed but your output says:

can’t find gem bundler

Does the following work for you?

$ gem install bundler

Yes, first time with Ruby on my system.

sudo gem install bundler

did work, said:

Successfully installed bundler-2.0.1

1 gem installed

:raised_hands: Progress! Now, could you try the bundle install and bin/setup commands again? We’re basically following these instructions now: https://dradisframework.com/ce/documentation/install_git.html

$ bundle install --path /opt/dradis-ce

Could not locate Gemfile

$ ls -l /opt/dradis-ce/Gemfile

-rw-r–r-- 1 root root 5794 Jan 24 10:21 /opt/dradis-ce/Gemfile

@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

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 https://github.com/dradis/dradis-calculator_cvss.git is not yet checked out. Please run bundle install before trying to start your application
Fetching https://github.com/dradis/dradis-calculator_cvss.git
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 https://github.com/dradis/dradis-ce/blob/4ef85f0ea4c40884e9d581b6b57d18241e76ace7/app/models/methodology.rb

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, https://github.com/dradis/dradis-theme_snowcrash/blob/master/dradis-theme_snowcrash.gemspec (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!