3

I followed this thread (Cannot install pg gem in Mavericks with Postgres.app) to get the 'pg' gem successfully working with Postgres.app on Mavericks.

Here is the output of gem list:

mythlabs:~ myth$ gem list pg

*** LOCAL GEMS ***

pg (0.17.1)
mythlabs:~ myth$ 

However, now that I have the gem installed, in irb :

mythlabs:~ myth$ irb
1.9.3-p0 :001 > require 'pg'  => true 
1.9.3-p0 :002 > conn = PG.connect( dbname: 'myth' ) NameError: uninitialized constant PG    from (irb):2    from /Users/myth/.rvm/rubies/ruby-1.9.3-p0/bin/irb:16:in `<main>'
1.9.3-p0 :003 >

How can I go around fixing this problem?

Community
  • 1
  • 1
Nitish Upreti
  • 6,312
  • 9
  • 50
  • 92

1 Answers1

1

I believe your problem was using that version of the gem, where you were suppose to use PGConn.open(' instead of PG.connect(, which was my issue.

Kryptman
  • 996
  • 9
  • 14