Metasploit has it's own version of ruby which is independent of either ruby1.8 or ruby1.9.2.
I am unclear how you managed to mingle the msf ruby and the BT5 ruby....
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.
Metasploit has it's own version of ruby which is independent of either ruby1.8 or ruby1.9.2.
I am unclear how you managed to mingle the msf ruby and the BT5 ruby....
The best information security training, period.
I don't know, really, if you want i can make a short video
Anyway how i can fix? i can't find other way for installing the postgresql module..
edit:
anyway i don't know what you mean with " has it's own version of ruby which is independent of either ruby1.8 or ruby1.9.2."
As far as i know it uses the version of the enviroment....
I'm having similar issues, but Metasploit will run for me. I'm having issues as described here concerning the pcaprub gem embedded in Metasploit (and I have not gotten the "recompile" fix described here to work either), however my min concern is with the BT5 ruby implementation as I was having a hell of a time getting my gems to load into my scripts.
The problem poizon describes here:
Is what I'm talking about. I've install ruby gems and have not been able to use them in my scripts, they I can verify both through gem list and the install location that they are there. However, I stumbled upon a work around and a possible cause for this behavior. In my install, if you print the ruby Gem.path variable, you get an array of two directories. One is the local user location (/user/.gem/blah/blah?) and the other is a location in the /usr directory. However, checking gem env shows that the install path and the gem directory there are both in /var. If you install gems using the --user-install (I think this is the option, I might be off in syntax, but gem help install should clear it up), you can then include your gems as you would normally be able to do. I've tried finding where the Gem.path array is set, and I thought it was going to be in rubygems/defaults.rb, but I couldn't find anything definitive. It seems that at least part of this would work as expected if that value could be changed. Until then, install your gems locally and they should be able to be loaded. As far as the Metasploit issue goes, I'm unsure of how that's going.#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>
Hi all,
Just had this problem and came up with what looks like a fix to it.
The problem is that the GEM_PATH isn't pointing to the location that ruby 1.9.2 is installing the gems into.
you can see the gem path by doing
ruby -r rubygems -e "p Gem.path"
and the path that a gem is installed into by doing
gem contents <gem name>
For my installation the gems are getting installed into /var/lib/gems/1.9.2/gems/ and the path in GEM_PATH is /usr/lib/ruby/gems/1.9.2
so my resolution was
cd /usr/lib/ruby
ln -s /var/lib/gems gems
which seems to work![]()
Have anyone tried to use RVM? (Ruby Version Manager) I just install it and at least for Rails it's cool.
The versions from the Repositories (1.9.2) always end with configuration errors, like the one above.
For what I have been reading that version it's very buggy.
Hi,
I have the same problem. But the directory /var/lib/gems/1.9.2 contains no file or directory. I did re-install the "libruby" package, still the files are missing. By the installation I am getting this error, on the other hand: E: rubygems1.9.2: subprocess installed post-installation script returned error exit status 2
Any hint?
ok so i am roughly new to the hole forum thing so please be easy if im in the wrong place please re direct me but im having issues with my gems when i do things wit SET like such
WARNING: File '/var/lib/gems/1.9.2/specifications/daemons-1.1.9.gemspec' does not evaluate to a gem specification
WARNING: File '/var/lib/gems/1.9.2/specifications/ansi-1.4.3.gemspec' does not evaluate to a gem specification
i was trying to backdoor into my comp is this normal and will it cause me issues?