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

时间:2013-11-28 05:41:20

标签: ruby-on-rails ruby bundler metasploit

所以我在虚拟机中运行backtrack 5。我正在尝试更新metasploit。我从github下载了metasploit目录并删除了旧的svn目录,就像web告诉我的那样(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>'

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

Gem::InstallError: factory_girl requires Ruby version >= 1.9.2.

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

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

这不是最新版本,但我在更新Ruby时遇到了麻烦,此时我想我也可以问一下互联网,并且有人真正知道这里有什么需要帮助。

1 个答案:

答案 0 :(得分: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

作为临时解决方法,您可以尝试明确安装bundler

gem install bundler

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