Install CE on ubunto 20.04

tried. followed install instructions
here Download the latest version | Dradis Framework which led to here: Setting up a Ruby environment for Dradis | Dradis Framework
first problem was here: eval “$(rbenv init - bash)” no rbenv, had to sudo apt install rbenv.
eval “$(rbenv init - bash)”
captain@scanner:~$ eval “$(rbenv init - bash)”
Command ‘rbenv’ not found, but can be installed with:
sudo apt install rbenv
looking to replace Qualys/ with nessus pro/openvas/bash, and do reports with metasploit (will likely be using the commercial version of dradis) need to see what reports look like first (qualys reports are good, but there is a 2 year old bug they can’t fix).

captain@scanner:~$ sudo apt install rbenv

got here, and stuck. rbenv install --list-all | grep 2.7.2
2.7.2
captain@scanner:~$ ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]

./bin/setup

== Enabling default add-ons ==
== Installing dependencies ==
Warning: the running version of Bundler (2.1.4) is older than the version that created the lockfile (2.2.8). We suggest you to upgrade to the version that created the lockfile by running gem install bundler:2.2.8.
Your Ruby version is 2.7.0, but your Gemfile specified 2.7.2
Warning: the running version of Bundler (2.1.4) is older than the version that created the lockfile (2.2.8). We suggest you to upgrade to the version that created the lockfile by running gem install bundler:2.2.8.
Your Ruby version is 2.7.0, but your Gemfile specified 2.7.2

== Command [“bundle install”] failed ==
captain@scanner:~/dradis-ce$ sudo gem install bundler:2.2.8
Fetching bundler-2.2.8.gem
Successfully installed bundler-2.2.8
Parsing documentation for bundler-2.2.8
Installing ri documentation for bundler-2.2.8
Done installing documentation for bundler after 3 seconds
1 gem installed
captain@scanner:~/dradis-ce$ sudo gem install bundler:2.2.8
Successfully installed bundler-2.2.8
Parsing documentation for bundler-2.2.8
Done installing documentation for bundler after 2 seconds
1 gem installed
captain@scanner:~/dradis-ce$ ./bin/setup

== Enabling default add-ons ==
== Installing dependencies ==
Your Ruby version is 2.7.0, but your Gemfile specified 2.7.2
Your Ruby version is 2.7.0, but your Gemfile specified 2.7.2

== Command [“bundle install”] failed ==
captain@scanner:~/dradis-ce$ rbenv
rbenv 1.2.0-14-gc6cc0a1
Usage: rbenv []

Hey @scheidell , welcome to the Dradis community! This seems to be the underlying problem:

Your Ruby version is 2.7.0, but your Gemfile specified 2.7.2

Check out this thread? Installation Issue - #8 by rachkor. Once the output of $ ruby -v shows 2.7.2, you should be good to go!

Hi @scheidell.

I also wanted to add that:

Is not the way rbenv is recommended to be installed in the guide you link at the top because it does a system-wide install and requires additional permissions. If you remove (via apt-get uninstall) and then follow steps 1. Install and 2. Setup from the guide to getting running for your user in a local folder, it’s going to help with the rest.

a removed it, followed (made sure).* files edited.

then reload:
captain@scanner:~$ bash -l
Command ‘rbenv’ not found, but can be installed with:
sudo apt install rbenv

looks like you need to run a new bash shell before you can reload bash shell?

captain@scanner:~$ bash
captain@scanner:~$ bash -l
captain@scanner:~$ rbenv -v
rbenv 1.2.0-14-gc6cc0a1
git clone imnw,won’tletmelink ruby-build.git “$(rbenv root)”/plugins/ruby-build
fatal: destination path ‘/home/captain/.rbenv/plugins/ruby-build’ already exists and is not an empty directory.
captain@scanner:~$ cat .ruby-version
cat: .ruby-version: No such file or directory

(so…)
rm -rf .rbenv/plugins/ruby-build/

mkdir -p “$(rbenv root)”/plugins
captain@scanner:~$ git cloneimnewwon’tletmelink /github.com/rbenv/ruby-build.git “$(rbenv root)”/plugins/ruby-build
Cloning into ‘/home/captain/.rbenv/plugins/ruby-build’…
remote: Enumerating objects: 12146, done.
remote: Counting objects: 100% (839/839), done.
remote: Compressing objects: 100% (314/314), done.
remote: Total 12146 (delta 556), reused 702 (delta 472), pack-reused 11307
Receiving objects: 100% (12146/12146), 2.55 MiB | 28.39 MiB/s, done.
Resolving deltas: 100% (8023/8023), done.
cat /dradis-ce/.ruby-version (this tripped me up: I did a cat .ruby-version and found nothing!).
yes, the web site shows a link to git, and git clearly shows where it is… not sure if editing the instructions would help someone like me who hasn’t touched a shell in 10 years ;-). (i was on the freebsd development team, … back in the day).

First check the version of Ruby that Dradis is currently pinned to in .ruby-versio] let’s say it’s:

2.7.0p0
now, back to dradis install.
git clone imnewwontletmelink GitHub - dradis/dradis-ce: Dradis Framework: Collaboration and reporting for IT Security teams
fatal: destination path ‘dradis-ce’ already exists and is not an empty directory
dradis-ce$ ./bin/setup
== Enabling default add-ons ==
== Installing dependencies ==
Warning: the running version of Bundler (2.1.4) is older than the version that created the lockfile (2.2.8). We suggest you to upgrade to the version that created the lockfile by running gem install bundler:2.2.8.

gem install bundler:2.2.8
Fetching bundler-2.2.8.gem
Successfully installed bundler-2.2.8
Parsing documentation for bundler-2.2.8
Installing ri documentation for bundler-2.2.8
Done installing documentation for bundler after 3 seconds
1 gem installed
captain@scanner:~/dradis-ce$ ./bin/setup

== Enabling default add-ons ==
== Installing dependencies ==
Your Ruby version is 2.7.2, but your Gemfile specified 2.7.0
Your Ruby version is 2.7.2, but your Gemfile specified 2.7.0

ruby -v
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]
checking @rachkor post now…
rbenv global
system
captain@scanner:~/dradis-ce$ rbenv global 2.7.2
captain@scanner:~/dradis-ce$ rbenv prefix 2.7.2
/home/captain/.rbenv/versions/2.7.2
captain@scanner:~/dradis-ce$ rbenv global
2.7.2
./bin/setup

== Enabling default add-ons ==
== Installing dependencies ==
Your Ruby version is 2.7.2, but your Gemfile specified 2.7.0
Your Ruby version is 2.7.2, but your Gemfile specified 2.7.0

captain@scanner:~/dradis-ce$ rbenv versions
system
2.7.0

  • 2.7.2 (set by RBENV_VERSION environment variable)
    captain@scanner:~/dradis-ce$ rbenv version
    2.7.2 (set by RBENV_VERSION environment variable)
    ls -l .gem/ruby/
    total 4
    drwxrwxr-x 3 captain captain 4096 Mar 16 16:37 2.7.0

[quote=“etd, post:3, topic:848, full:true”]
Hi @scheidell.

I also wanted to add that:

Is not the way rbenv is recommended to be installed in the guide you link at the top because it does a system-wide install and requires additional permissions. If you remove (via apt-get uninstall) and then follow steps [1. Install](imnewwanotletmelink Setting up a Ruby environment for Dradis | Dradis Framework) and [2. Setup](ls -l .gem/ruby/
total 4
drwxrwxr-x 3 captain captain 4096 Mar 16 16:37 2.7.0

says ‘edit the gemfile’… which would be where?

now when i login, i get: Last login: Thu Mar 17 09:17:38 2022 from 73.46.248.12

Command ‘rbenv’ not found, but can be installed with:

sudo apt install rbenv
grep captain /etc/passwd
captain:x:1000:1000:Ubuntu:/home/captain:/bin/bash

rbenv

Command ‘rbenv’ not found, but can be installed with:

sudo apt install rbenv

captain@scanner:~$ bash
captain@scanner:~$ rbenv global
2.7.2
which rbenv
/home/captain/.rbenv/bin/rbenv

grep PATH .bashrc .profile
.bashrc:export PATH=“$HOME/.rbenv/bin:$PATH”
.profile:# set PATH so it includes user’s private bin if it exists
.profile: PATH=“$HOME/bin:$PATH”
.profile:# set PATH so it includes user’s private bin if it exists
.profile: PATH=“$HOME/.local/bin:$PATH”

Last login: Thu Mar 17 09:55:14 2022 from 73.46.248.12

Command ‘rbenv’ not found, but can be installed with:

sudo apt install rbenv

captain@scanner:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

captain@scanner:~$ bash
captain@scanner:~$ echo $PATH
/home/captain/.rbenv/shims:/home/captain/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

~/.profile: executed by the command interpreter for login shells.bashrc

This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login

exists.

see /usr/share/doc/bash/examples/startup-files for examples.

the files are located in the bash-doc package.

@rachkor as it turns out, either I or maybe some of the 20 random suggestions had me edit .bash_profile (since on unbunto, .bashrc doesn’t run on login)

this WAS .bash_profile:
if which rbenv > /dev/null; then eval “$(rbenv init -)”; fi
eval “$(rbenv init - bash)”

(maybe i missed something)
this fixed the login 'command ‘rbenv’ not found:

if which rbenv > /dev/null; then eval “$(rbenv init -)”; fi
export PATH=“$HOME/.rbenv/bin:$PATH”
eval “$(rbenv init - bash)”

(I wanted a demo, but thought it would be easiet to install the CE. been 10 years since I needed to touch a shell. and, I used to work on freebsd (still scheidell@freebsd.org fwds to my main email)…

I am going to replace Qualys VM and WAS. (which has great reports) with a combination of Nessus Pro/ OPenvas (which I worked on back when i was younger) and burp. I need to make sure i can produce quality reports, mainly, with the added benefit of the audit templates, corporation, and ability to distribute the reports to clients. I tried ‘the other’ report writing companies product 2 years ago, and wasn’t up to my expectations.

Now that I have the bash env working, and I run ./bin/setup. I get this: (but i would really like to see the demo since it is the commercial product I am interested in)

captain@scanner:~/dradis-ce$ ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
captain@scanner:~/dradis-ce$ sudo ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]

Installing websocket-driver 0.7.5 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/home/captain/dradis-ce/vendor/bundle/ruby/2.7.0/gems/RedCloth-4.3.2/ext/redcloth_scan
/usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20220318-361008-ykwyh5.rb
extconf.rb
mkmf.rb can’t find header files for ruby at /usr/lib/ruby/include/ruby.h

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.

extconf failed, exit code 1

Gem files will remain installed in
/home/captain/dradis-ce/vendor/bundle/ruby/2.7.0/gems/RedCloth-4.3.2 for
inspection.
Results logged to
/home/captain/dradis-ce/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/RedCloth-4.3.2/gem_make.out

An error occurred while installing RedCloth (4.3.2), and Bundler cannot
continue.
Make sure that gem install RedCloth -v '4.3.2' --source 'https://rubygems.org/' succeeds before bundling.

In Gemfile:
dradis-html_export was resolved to 4.2.0, which depends on
RedCloth

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/home/captain/dradis-ce/vendor/bundle/ruby/2.7.0/gems/racc-1.6.0/ext/racc/cparse
/usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20220318-361008-11ros2i.rb
extconf.rb
mkmf.rb can’t find header files for ruby at /usr/lib/ruby/include/ruby.h

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.

extconf failed, exit code 1

Gem files will remain installed in
/home/captain/dradis-ce/vendor/bundle/ruby/2.7.0/gems/racc-1.6.0 for inspection.
Results logged to
/home/captain/dradis-ce/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/racc-1.6.0/gem_make.out

An error occurred while installing racc (1.6.0), and Bundler cannot
continue.
Make sure that gem install racc -v '1.6.0' --source 'https://rubygems.org/'
succeeds before bundling.

In Gemfile:
dradis-html_export was resolved to 4.2.0, which depends on
rails_autolink was resolved to 1.1.6, which depends on
rails was resolved to 6.1.4.7, which depends on
actioncable was resolved to 6.1.4.7, which depends on
actionpack was resolved to 6.1.4.7, which depends on
actionview was resolved to 6.1.4.7, which depends on
rails-dom-testing was resolved to 2.0.3, which depends on
nokogiri was resolved to 1.13.2, which depends on
racc

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/home/captain/dradis-ce/vendor/bundle/ruby/2.7.0/gems/nio4r-2.5.8/ext/nio4r
/usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20220318-361008-u766pp.rb
extconf.rb
mkmf.rb can’t find header files for ruby at /usr/lib/ruby/include/ruby.h

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.

extconf failed, exit code 1

Gem files will remain installed in
/home/captain/dradis-ce/vendor/bundle/ruby/2.7.0/gems/nio4r-2.5.8 for
inspection.
Results logged to
/home/captain/dradis-ce/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/nio4r-2.5.8/gem_make.out

An error occurred while installing nio4r (2.5.8), and Bundler cannot
continue.
Make sure that gem install nio4r -v '2.5.8' --source 'https://rubygems.org/'
succeeds before bundling.

In Gemfile:
dradis-html_export was resolved to 4.2.0, which depends on
rails_autolink was resolved to 1.1.6, which depends on
rails was resolved to 6.1.4.7, which depends on
actioncable was resolved to 6.1.4.7, which depends on
nio4r

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/home/captain/dradis-ce/vendor/bundle/ruby/2.7.0/gems/bcrypt-3.1.12/ext/mri
/usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20220318-361008-1odpo4p.rb
extconf.rb
mkmf.rb can’t find header files for ruby at /usr/lib/ruby/include/ruby.h

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.

extconf failed, exit code 1

Gem files will remain installed in
/home/captain/dradis-ce/vendor/bundle/ruby/2.7.0/gems/bcrypt-3.1.12 for
inspection.
Results logged to
/home/captain/dradis-ce/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/bcrypt-3.1.12/gem_make.out

An error occurred while installing bcrypt (3.1.12), and Bundler cannot
continue.
Make sure that gem install bcrypt -v '3.1.12' --source 'https://rubygems.org/'
succeeds before bundling.

In Gemfile:
bcrypt

the saga continues (no doubt because I googled for answers and just tried them at random).
in the project folder, found the Gemfile

changed:
#ruby ‘2.7.0’
ruby ‘2.7.2’

NOW ./bin/setup runs.

AH, her’s something new:
== Removing old logs and tempfiles ==
NOTE: nokogumbo: Using Nokogiri::HTML5 provided by Nokogiri. See Information for Nokogumbo users about the Nokogiri merger · Issue #2205 · sparklemotion/nokogiri · GitHub for more information.

== Restarting application server ==
NOTE: nokogumbo: Using Nokogiri::HTML5 provided by Nokogiri. See links//github.com/sparklemotion/nokogiri/issues/2205 for more information.
=> Booting Puma
=> Rails 6.1.4.7 application starting in development
=> Run bin/rails server --help for more startup options
Puma starting in single mode…

  • Puma version: 5.6.2 (ruby 2.7.2-p137) (“Birdie’s Version”)
  • Min threads: 5
  • Max threads: 5
  • Environment: development
  •      PID: 37links 127.0.0.1:8080
    
  • Listening on ;omls [::1]:8080
    Use Ctrl-C to stop
    ^c and then: Exiting

captain@scanner:~/dradis-ce$ ./bin/rails server
NOTE: nokogumbo: Using Nokogiri::HTML5 provided by Nokogiri. See can’tuselinks://github.com/sparklemotion/nokogiri/issues/2205 for more information.
=> Booting Puma
=> Rails 6.1.4.7 application starting in development
=> Run bin/rails server --help for more startup options
Puma starting in single mode…

  • Puma version: 5.6.2 (ruby 2.7.2-p137) (“Birdie’s Version”)
  • Min threads: 5
  • Max threads: 5
  • Environment: development
  •      PID: 377886
    
  • Listening on newusercantuselinks127.0.0.1:3000
  • Listening on cantuselinks:0//[::1]:3000
    Use Ctrl-C to stop

now, there should be? could be? instructions on how to listen to something other then localhost?

Hi @scheidell, glad to see you got CE running successfully.

If you would like to access the CE instance from other machines then you have a couple of options.

The faster but less secure way would be to start the server with bin/rails s -b 0.0.0.0 then you can connect to the instance from other machines by navigating to http://<IP of machine hosting CE>:3000

Alternatively, you can deploy CE quickly and easily to Heroku or Digital Ocean using the buttons found in the Dradis github readme. Note that you will need a heroku or digitalocean account.