From: Stu Date: 2004-11-27T00:43:03+09:00 Subject: Re: [ANN] postgres-pr (pure Ruby PostgreSQL) On Fri, 19 Nov 2004 00:12:28 +0900, Michael Neumann wrote: > > gem install postgres-pr > > irb -r rubygems > >Then in the interactive Ruby interpreter type (replace DBNAME and DBUSER >accordingly): > > require 'postgres-pr/connection' > c = Connection.new('DBNAME', 'DBUSER') > c.query('SELECT 1+2') # => [["3"]] > Am having problems testing... I added 0.2.2 via gem install method.. and following the above I get; E:\ruby\code\postgres-test>irb -r rubygems irb(main):001:0> require 'postgres-pr/connection' => true irb(main):002:0> c = Connection.new('dbtest', 'sgeorge') NameError: uninitialized constant Connection from (irb):2 and so doing a test .rb require 'rubygems' require_gem 'postgres-pr/connection', ">= 0.2.2" c = Connection.new('dbtest', 'sgeorge') c.query('SELECT 1+2') It doesnt like it.... e:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:116:in `activate': (Gem::LoadError) Could not find RubyGem postgres-pr/Connection (>= 0.2.2) from e:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:34:in `require_gem' from test.rb:2 I tried even PostgresPR::Connection.new, etc... can you pass /connection in a reqiure_gem? hmm so removing the /connection from the require_gem line gets me test.rb:4: uninitialized constant Connection (NameError) so... how exactly do I use it??? (I have a dbtest created and my username associated to that DB, I checked that already with psql).... what exactly am I doing wrong? -- Stu -- [FAQ] Write Your Own Operating System http://www.mega-tokyo.com/osfaq2