Michael Satterwhite wrote in post #969184: > Peter Vandenabeele wrote in post #969183: >> >> Ah, thanks for that info. >> It works that way here too. >> >> pet...@asus:~$ export RUBYOPT=rubygems >> pet...@asus:~$ echo $RUBYOPT >> rubygems >> pet...@asus:~$ irb >> irb(main):001:0> require 'pg' >> => true >> irb(main):002:0> Object.constants.grep(/PG/) >> => ["PGconn", "PGresult", "PGError"] >> > > Actually, yours works much better ... mine isn't working, remember. <g> > > Any idea of how I can find where that bogus 'pg' is coming from? The gem > isn't installed anymore, but "require 'pg'" still returns true - loading > no constants.
Aha, this might hint where your seemingly succeeded require is getting its input ? After the require, the $LOAD_PATH has grown ! irb(main):004:0> puts $LOAD_PATH /usr/local/lib/site_ruby/1.8 /usr/local/lib/site_ruby/1.8/i486-linux /usr/local/lib/site_ruby/1.8/i386-linux /usr/local/lib/site_ruby /usr/lib/ruby/vendor_ruby/1.8 /usr/lib/ruby/vendor_ruby/1.8/i486-linux /usr/lib/ruby/vendor_ruby /usr/lib/ruby/1.8 /usr/lib/ruby/1.8/i486-linux /usr/lib/ruby/1.8/i386-linux . => nil irb(main):005:0> require 'pg' => true irb(main):006:0> puts $LOAD_PATH /usr/lib/ruby/gems/1.8/gems/pg-0.10.0/bin /usr/lib/ruby/gems/1.8/gems/pg-0.10.0/lib /usr/lib/ruby/gems/1.8/gems/pg-0.10.0/ext /usr/local/lib/site_ruby/1.8 /usr/local/lib/site_ruby/1.8/i486-linux /usr/local/lib/site_ruby/1.8/i386-linux /usr/local/lib/site_ruby /usr/lib/ruby/vendor_ruby/1.8 /usr/lib/ruby/vendor_ruby/1.8/i486-linux /usr/lib/ruby/vendor_ruby /usr/lib/ruby/1.8 /usr/lib/ruby/1.8/i486-linux /usr/lib/ruby/1.8/i386-linux . => nil Also, I had ran those 2 on my machine here (from the root directory): pet...@asus:/$ find . -name 'pg.rb' 2>/dev/null ./home/peterv/.rvm/gems/ruby-1.9.2-p0/gems/pg-0.10.0/lib/pg.rb ./usr/lib/ruby/gems/1.8/gems/pg-0.10.0/lib/pg.rb pet...@asus:/$ find . -name 'pg.so' 2>/dev/null and that seems correct: * 1 time pg.rb in .rvm/gems for 1.9.2 (from the first example I showed) * 1 time pg.rb in /user/lib/gems/1.8 ... (system ruby) no files pg.so found. A long shot, but you could try that too and compare ... HTH, Peter -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

