I am trying to update to Rails 5. I have successfully updated Ruby to '2.3.1' in my gem file, and ran bundle install.
Then I went for Rails 5.0, and it told me:
Make sure that gem install pg -v '0.18.2' succeeds before bundling.
I put rails back to 4.2 like it is now, and I tried to update pg in the terminal by running gem install pg -v '0.18.2'
, and by updating the gem file and running bundle install
and both times get this error:
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/Users/w*****n/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-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/w******n/.rvm/rubies/ruby-2.1.2/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/w******n/.rvm/gems/ruby-2.1.2/gems/pg-0.18.2 for inspection.
Results logged to /Users/w*******n/.rvm/gems/ruby-2.1.2/extensions/x86_64-darwin-13/2.1.0-static/pg-0.18.2/gem_make.out
Ive found this post which is a similar error, but when I try their solutions, it does not work.
My question has 1.5 parts: 1. How can I get pg to upgrade to the newest version .5 Why am I getting this, and how do I interpret that error?
Aucun commentaire:
Enregistrer un commentaire