It could be something I'm doing wrong, kind of new to Ruby. I'm running this on the latest version of Backtrack .
This is what I get when testing:
t# ruby netlist.rb facebook
netlist.rb:2:in `require': no such file to load -- subexec (LoadError)
I did a "gem install subexec":
t# gem install subexec
Successfully installed subexec-0.2.2
1 gem installed
Installing ri documentation for subexec-0.2.2...
Installing RDoc documentation for subexec-0.2.2...
but I still get the same error.
What version of Ruby are you running?
If you're running Ruby 1.8, try:
ruby -rubygems netlist.rb facebook
Alternatively, you can add RubyGems to RUBYOPT:
t# ruby --version
ruby 1.9.2dev (2010-07-02) [i486-linux]
What does running gem env output?
Hmmm, not exactly sure right off the bat.. Do you have RVM installed? Also, what's which ruby output?
If you let me know how to check for RVM I will.
There's your issue. ruby points to "/usr/bin/ruby", but gem is using "/usr/bin/ruby1.9.2". To verify this, could you try running /usr/bin/ruby1.9.2 netlist.rb facebook?
/usr/bin/ruby1.9.2 netlist.rb facebook
RVM is a popular Ruby version manager, and it helps you deal with multiple installations of Ruby and multiple gemsets on your machine. Without it, your environment may end up referencing different Ruby paths, which seems to be what's happening here.
Hmm. still getting the same thing, tested both ways:
netlist.rb:2:in require': no such file to load -- subexec (LoadError)
require': no such file to load -- subexec (LoadError)
Huh. I'm not really sure, sorry!
The last thing I can think of would be to try: export GEM_HOME="/var/lib/gems/1.9.2" and export GEM_HOME="/root/.gem/ruby/1.9.2"