I think this is a common problem, however the solutions I've found on the internet are not working for me. When I run bundle install with this section in my gemfile
group :production, :staging do
gem "pg"
end
group :development, :test do
gem "sqlite3-ruby", :require => "sqlite3"
end
I get the following error
creating Makefile
make
compiling gvl_wrappers.c
compiling pg.c
pg.c: In function ‘Init_pg_ext’:
pg.c:375: error: ‘PQPING_OK’ undeclared (first use in this function)
pg.c:375: error: (Each undeclared identifier is reported only once
pg.c:375: error: for each function it appears in.)
pg.c:377: error: ‘PQPING_REJECT’ undeclared (first use in this function)
pg.c:379: error: ‘PQPING_NO_RESPONSE’ undeclared (first use in this function)
pg.c:381: error: ‘PQPING_NO_ATTEMPT’ undeclared (first use in this function)
make: *** [pg.o] Error 1
Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p194/gems/pg-0.16.0 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p194/gems/pg-0.16.0/ext/gem_make.out
Next step, according to what I've found, is to run locate pg_config, then place the location after the gem install pgcommand line statement. However, I get this error instead:
WARNING: The locate database (/var/db/locate.database) does not exist.
To create the database, run the following command:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
Please be aware that the database can take some time to generate; once
the database has been created, this message will no longer appear.
I then run the sudo command, and get this final error....
launchctl: Couldn't stat("/System/Library/LaunchDaemons/com.apple.locate.plis"): No such file or directory
nothing found to load
This is my first attempt at using this technology, brand new to Mac as well. Any help would be appreciated. Thanks!
EDIT
I am trying to follow the suggestions located here regarding this error.
/usr/bin/pg_config), however after adding this to thegem installstatement still received the same error.