Mike
Mike

Reputation: 137

Metasploit error

After I've tried to install Ruby on Rails on my kali linux, I cant use run the following anymore:

service metasploit start

I'm getting this error:

Starting Metasploit web server: thin/opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.5/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find rake-10.1.0 in any of the sources (Bundler::GemNotFound)
    from /opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `map!'
    from /opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `materialize'
    from /opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in `specs'
    from /opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:159:in `specs_for'
    from /opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:148:in `requested_specs'
    from /opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.5/lib/bundler/environment.rb:18:in `requested_specs'
    from /opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:13:in `setup'
    from /opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
    from /opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `<top (required)>'
    from /usr/local/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `require'
    from /usr/local/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
    from /usr/local/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:144:in `require'
    from /opt/metasploit/apps/pro/ui/scripts/ctl.rb:29:in `start_thin'
    from /opt/metasploit/apps/pro/ui/scripts/ctl.rb:46:in `<main>'

How can I fix this?

Upvotes: 0

Views: 1921

Answers (1)

imandrewd
imandrewd

Reputation: 343

You'll want to use something to manage your ruby gems, like RVM

When you installed Ruby on Rails it looks like this updated the rake rubygem to a version which is incompatible with metasploit:

Could not find rake-10.1.0 in any of the sources (Bundler::GemNotFound)

I would run the following command to downgrade rake (maybe needs sudo):

gem install rake --version "10.1.0"

Now make sure to use rvm (or rbenv) to isolate gemsets and avoid version inconsistencies.

Upvotes: 1

Related Questions