dradis / dradis-ce

Dradis Framework: Collaboration and reporting for IT Security teams
https://dradis.com/ce/
GNU General Public License v2.0
668 stars 190 forks source link

Failing to set up dradis because of `dradis-calculator_cvss` not in Gemfile #83

Closed lfuelling closed 7 years ago

lfuelling commented 7 years ago

This issue really drives me crazy. Have this output:

== Cloning core Dradis add-ons at /dradis-git/server/.. ==
Cloning into 'dradis-calculator_cvss'...
Cloning into 'dradis-calculator_dread'...
Cloning into 'dradis-csv'...
Cloning into 'dradis-html_export'...
Cloning into 'dradis-mediawiki'...
Cloning into 'dradis-vulndb'...
Cloning into 'dradis-acunetix'...
Cloning into 'dradis-brakeman'...
Cloning into 'dradis-burp'...
Cloning into 'dradis-metasploit'...
Cloning into 'dradis-nessus'...
Cloning into 'dradis-nexpose'...
Cloning into 'dradis-nikto'...
Cloning into 'dradis-nmap'...
Cloning into 'dradis-ntospider'...
Cloning into 'dradis-openvas'...
Cloning into 'dradis-qualys'...
Cloning into 'dradis-zap'...
Cloning into 'dradis-plugins'...
Cloning into 'dradis-projects'...
== Installing dependencies ==
The Gemfile's dependencies are satisfied

== Copying sample files ==

== Preparing database ==
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/resolver.rb:379:in `block in verify_gemfile_dependencies_are_found!': Could not find gem 'dradis-calculator_cvss (~> 3.0)' in any of the gem sources listed in your Gemfile. (Bundler::GemNotFound)
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/resolver.rb:349:in `each'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/resolver.rb:349:in `verify_gemfile_dependencies_are_found!'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/resolver.rb:203:in `start'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/resolver.rb:182:in `resolve'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/definition.rb:252:in `resolve'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/definition.rb:176:in `specs'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/definition.rb:235:in `specs_for'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/definition.rb:224:in `requested_specs'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/runtime.rb:118:in `block in definition_method'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/runtime.rb:19:in `setup'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler.rb:100:in `setup'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/setup.rb:20:in `<top (required)>'
    from /usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:133:in `require'
    from /usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
    from /usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:40:in `require'
    from /dradis-git/server/config/boot.rb:3:in `<top (required)>'
    from bin/rails:3:in `require_relative'
    from bin/rails:3:in `<main>'

== Command ["bin/rails db:setup"] failed ==
/install-dradis.sh: line 20: expect: command not found
Bundler::GemNotFound: Could not find gem 'dradis-calculator_cvss (~> 3.0)' in any of the gem sources listed in your Gemfile.
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/resolver.rb:379:in `block in verify_gemfile_dependencies_are_found!'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/resolver.rb:349:in `each'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/resolver.rb:349:in `verify_gemfile_dependencies_are_found!'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/resolver.rb:203:in `start'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/resolver.rb:182:in `resolve'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/definition.rb:252:in `resolve'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/definition.rb:176:in `specs'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/definition.rb:235:in `specs_for'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/definition.rb:224:in `requested_specs'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/runtime.rb:118:in `block in definition_method'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/runtime.rb:19:in `setup'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler.rb:100:in `setup'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/setup.rb:20:in `<top (required)>'
  /usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  /usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
bundler: failed to load command: rake (/usr/local/bundle/bin/rake)

As you can see, the dradis-calculator_cvss plugin is cloned and not installed using gem. Shortly afterwards the script fails because the calculator is not in the Gemfile.

I'm trying to install on Debian jessie following partly this README and the guide on the website which has an extra step and lists dependencies.

I hope someone else has resolved this and can help.

dormi commented 7 years ago

Hi @lfuelling, I think this problem has been already reported here: https://github.com/dradis/dradis-ce/issues/75

lfuelling commented 7 years ago

Oh right.

I also just solved it by removing the version number and using the path like it's done for all the other plugins in Gemfile.plugins.template. I also had to do this for all the other plugins since they are all cloned by the setup script.