没有这样的文件加载 - bundler(LoadError)

Cod*_*wer 3 ruby ruby-on-rails bundler metasploit

所以我在虚拟机中运行backtrack 5.我正在尝试更新metasploit.我从github下载了metasploit目录并删除了旧的svn目录,就像网络告诉我的那样(https://community.rapid7.com/community/metasploit/blog/2013/05/20/git-clone-metasploit-dont -svn-checkout).运行msfupdate时出现此错误:

root@bt:~/metasploit# ./msfupdate
[*]
[*] Attempting to update the Metasploit Framework...
[*]

[*] Checking for updates via git
[*] Note: Updating from bleeding edge
HEAD is now at a02e0ee Land #2682 - Kimai v0.9.2 'db_restore.php' SQL Injection
Already on 'master'
Already up-to-date.
[*] Updating gems...
./msfupdate:188:in `require': no such file to load -- bundler (LoadError)
    from ./msfupdate:188:in `update_git!'
    from ./msfupdate:137:in `block in run!'
    from ./msfupdate:135:in `chdir'
    from ./msfupdate:135:in `run!'
    from ./msfupdate:292:in `<main>'
Run Code Online (Sandbox Code Playgroud)

我知道我可以运行bundle命令来"捆绑更新"和"捆绑安装".在旁注中,当您运行"捆绑更新"时,这也会导致错误:

Gem::InstallError: factory_girl requires Ruby version >= 1.9.2.
Run Code Online (Sandbox Code Playgroud)

考虑到当我要求Ruby的版本时我得到这个,这很奇怪:

root@bt:~/metasploit# ruby -v
ruby 1.9.2dev (2010-07-02) [x86_64-linux]
Run Code Online (Sandbox Code Playgroud)

这不是最新版本,但是我在更新Ruby时遇到了麻烦,而且我觉得我不妨问互联网,并且有人真正知道这里发生了什么事情来帮忙.

Ale*_*kin 7

一切都是正确的,因为1.9.2dev版本先于 1.9.2:

irb > Gem::Version.new('1.9.2dev') >= Gem::Version.new('1.9.2')
# => false
irb > Gem::Version.new('1.9.2dev') >= Gem::Version.new('1.9.1')
# => true
Run Code Online (Sandbox Code Playgroud)

作为临时解决方法,您可以尝试bundler显式安装:

gem install bundler
Run Code Online (Sandbox Code Playgroud)

显然我建议你在任何情况下升级Ruby,dev版本肯定不是最好的选择.