1 Reply Latest reply on May 23, 2013 9:13 AM by jintao

    msfupdate problem : related to gem bundler


      hi all,

      When I am trying to run msfconsole on my msf git install. I got the following error :-

      sudo ./msfconsole

      [*] Metasploit requires the Bundler gem to be installed

      I did a gem install bundler, which returned a success.

      But the error keeps coming back. I found that on my ubuntu machine, I have a ruby 1.8.3 install, actually the gem install bundler is by default installing the gem in the ubuntu ruby install and not the metasploit ruby installation.


      the gem env output is as below :-

      RubyGems Environment:

        - RUBYGEMS VERSION: 1.8.15

        - RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]

        - INSTALLATION DIRECTORY: /var/lib/gems/1.8

        - RUBY EXECUTABLE: /usr/bin/ruby1.8

        - EXECUTABLE DIRECTORY: /usr/local/bin


          - ruby

          - x86-linux

        - GEM PATHS:

           - /var/lib/gems/1.8

           - /home/nishith/.gem/ruby/1.8


           - :update_sources => true

           - :verbose => true

           - :benchmark => false

           - :backtrace => false

           - :bulk_threshold => 1000


           - http://rubygems.org/


      How to install the bundler gem for the metasploit install of ruby ?



        • Re: msfupdate problem : related to gem bundler

          hi all,

          I have resolved the issue....this might help someone else too, so posting the solution.

          Firstly I checked out how ruby is installed on the system using the following command:-

          sudo dpkg -l | grep ruby

          I realised I have both ruby1.8.7 and ruby1.9.2 installed on the system. So removed all the libruby1.8.7 , ruby1.8.7-dev and ruby1.8.7 files and the rubygems:-

          sudo apt-get purge ruby1.8.7

          sudo apt-get purge libruby1.8.7

          sudo apt-get purge ruby1.8.7-dev

          sudo apt-get purge rubygems*

          Then I just installed rubygems1.9.1 with

          sudo apt-get install rubygems1.9.1

          Next I did a

          sudo gem install bundler

          sudo bundle install

          I verified everything is fine :-

          root@localhost:~$ ruby -v

          ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]

          root@localhost:~$ gem -v


          root@localhost:~$ gem list

          *** LOCAL GEMS ***


          activemodel (3.2.13)

          activerecord (3.2.13)

          activesupport (3.2.13)

          arel (3.0.2)

          bourne (1.4.0)

          builder (3.0.4)

          bundler (1.3.5)



          Lastly, I pulled down the metasploit from the github :-

          cd /opt

          sudo git init

          git clone git://github.com/rapid7/metasploit-framework.git /opt/framework

          Then the following to get going  :-

          sudo cd /opt/framework

          sudo ./msfconsole

          thanks and bye