So I am pretty new to this, please don't overestimate me and explain my issue/solution in detail :)
Basicly I tried installing metasploit on BackTrack 5, however when running the command "msfconsole" (or any command linked to metasploit) I get this error:
root@bt:~# msfconsole
/opt/metasploit/ruby/lib/ruby/1.9.1/rubygems.rb:31:in `require': cannot load such file -- rbconfig (LoadError)
from /opt/metasploit/ruby/lib/ruby/1.9.1/rubygems.rb:31:in `<top (required)>'
from <internal:gem_prelude>:1:in `require'
from <internal:gem_prelude>:1:in `<compiled>'
I looked around, and couldn't really understand my issue, I tried using solutions that worked for others, but those never seemed to work for me. Some more details about my problem (used commands which were requested on other help subjects regarding rubygems)
root@bt:~# ruby -v
ruby 1.9.2dev (2010-07-02) [x86_64-linux]
root@bt:~# which ruby
/usr/bin/ruby
root@bt:~# gem env | grep 'RUBY EXECUTABLE'
- RUBY EXECUTABLE: /usr/bin/ruby1.9.2
root@bt:~# ls -l /usr/bin/ruby*
lrwxrwxrwx 1 root root 22 2013-08-08 21:53 /usr/bin/ruby -> /etc/alternatives/ruby
-rwxr-xr-x 1 root root 6264 2012-02-22 02:42 /usr/bin/ruby1.8
-rwxr-xr-x 1 root root 6288 2010-08-27 18:31 /usr/bin/ruby1.9.2
-rwxr-xr-x 1 root root 275 2012-05-16 07:09 /usr/bin/ruby-whine
Reinstalling libruby helped me on debian jessie.