0

在我尝试在我的 kali linux 上安装 Ruby on Rails 之后,我不能再使用运行以下命令了:

service metasploit start

我收到此错误:

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>'

我怎样才能解决这个问题?

4

1 回答 1

1

你会想用一些东西来管理你的红宝石宝石,比如RVM

当您安装 Ruby on Rails 时,看起来像这样将 rake ruby​​gem 更新为与 metasploit 不兼容的版本:

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

我会运行以下命令来降级 rake(可能需要 sudo):

gem install rake --version "10.1.0"

现在确保使用 rvm (或rbenv)来隔离 gemset 并避免版本不一致。

于 2013-11-04T16:45:17.480 回答