title: Problems Installing Metasploit Framework on Ubuntu
body: <p>I have encountered 3 problems while following <a href="http://www.darkoperator.com/installing-metasploit-in-ubunt/" rel="nofollow">this guide</a> to installing Metasploit Framework on Ubuntu and Debian:</p>
  
  <p>1) After installing proper version of ruby, there is a command given for installing Ruby libraries: <code>sudo gem install bundler</code>. When I typed that in and hit enter, it says "command not found". After some researching on the internet, I decided to remove <code>sudo</code> and try again. So I've entered <code>gem install bundler</code> and it worked fine. Will this cause any problems?</p>
  
  <p>2) After installing Metasploit Framework, there is a command given to install the required gems and versions: </p>
  
  <pre><code>cd metasploit-framework
  bundle install
  </code></pre>
  
  <p>But when I tried that, I got this error:</p>
  
  <blockquote>
    <p>rbenv: version '2.1.6' is not installed</p>
  </blockquote>
  
  <p>I really don't know what to do next (But I moved on).</p>
  
  <p>3) Probably due to the previous problems, in the end when I executed <code>msfconsole</code> command, it said </p>
  
  <blockquote>
    <p>could not find rake-10.4.2 in any of the sources.</p>
    
    <p>run bundle install to install the missing gems</p>
  </blockquote>
  
  <p>But the bundle install doesn't help either, because when I run that it says</p>
  
  <blockquote>
    <p>Could not locate Gemfile or .bundle/directory</p>
  </blockquote>
  
  <p>Any help would be appreciated. </p>
  
  <p><strong>EDIT:</strong> When I asked the person himself who had written the guide, regarding this, he told me to select the version of ruby I had just installed with either rebind or RVM before installing bundler, and then to run the bundle install. Could you please list the commands to do so? I am really new to Linux!</p>