Michael Satterwhite wrote in post #969123: > Philip Hallstrom wrote in post #969122: >>> >>> ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::PGconn >> Try the 'pg' gem. > > I just installed it. Same result. > > I'm not sure my gem is installing correctly, though - or if there is > something else needed. Note the following: > > irb(main):001:0> require 'pg' > => true > irb(main):002:0> cn = PGconn.open(:dbname => 'movies') > NameError: uninitialized constant PGconn > from (irb):2
That is strange. Maybe try to check which constants where added when you execute the "require 'pg'" command ? $ irb ruby-1.9.2-p0 > c = Object.constants ; nil #=> nil (remember constants) ruby-1.9.2-p0 > require 'pg' #=> true ruby-1.9.2-p0 > Object.constants - c # which constants where added? => [:ConditionVariable, :Queue, :SizedQueue, :Etc, :RbConfig, :Config, :CROSS_COMPILING, :Date, :Pathname, :PGError, :PGconn, :PGresult] ruby-1.9.2-p0 > PGconn #=> PGconn (constant is defined ) ruby-1.9.2-p0 > cn = PGconn.open(:dbname => 'movies') PGError: could not connect to server: No such file or directory ... 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.

