Hi all,
I've seen that there are similar topic to this, but no one related to this issue.
I've tried with both kde and ubuntu bt5 and is always the same.
The problem.
By default bt5 uses ruby1.9.2 the problem is that there is no way to install gems, or better, seems like that interpreter can't load it.
I have metasploit 3.8 and i can't run it with ./msfconsole instead i must run it with ruby1.8 msfconsole and now i will explain why.
If I install pg via gem
gem install pg
it installs in the folder of ruby 1.9.2 but when you try to load it via irb i get the error:
#irb
irb(main):001:0> require 'rubygems'
=> false
irb(main):002:0> require 'pg'
LoadError: no such file to load -- pg
from (irb):2:in `require'
from (irb):2
from /usr/bin/irb:12:in `<main>'
irb(main):003:0>

So I've tried installing the driver with ruby1.8
gem1.8 install pg everything works fine:
#irb1.8
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'pg'
=> true
irb(main):003:0>

What drive me crazy ( and trust me I've spent 2 days before posting here ) is that the pg module is installed!

root@bt:/pentest/exploits# gem list --local | grep pg
pg (0.11.0)
root@bt:/pentest/exploits#

I don't know what the problem is, anyway I've tried reinstalling rubygems and I've got this error:

update-alternatives: error: alternative gem can't be master: it is a slave of ruby
dpkg: error processing rubygems1.9.2 (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
rubygems1.9.2
E: Sub-process /usr/bin/dpkg returned an error code (1)


By default of course I have ruby1.9.2.
Thanks in advance.