I was trying to use postgresql
with Ruby on Rails
However, I type gem install pg
, it comes with an error
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/Coda/.rvm/rubies/ruby-2.1.3/bin/ruby
--with-pg
--without-pg
--enable-windows-cross
--disable-windows-cross
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
extconf failed, exit code 1
Gem files will remain installed in /Users/Coda/.rvm/gems/ruby-2.1.3@rails416/gems/pg-0.18.2 for inspection.
Results logged to /Users/Coda/.rvm/gems/ruby-2.1.3@rails416/extensions/x86_64-darwin-13/2.1.0/pg-0.18.2/gem_make.out
Environment: Mac OSX 10.10
rails version: Rails 4.1.8
ruby version: ruby 2.1.3
First,I downloaded and and installed Postgres.app
at here , then set the right Path
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin
Final, retype the command
gem install pg
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.