Ich versuchte pg Gem auf Mac El Capitan zu installieren, aber ich bekomme immer diese Fehlermeldung:gem install pg funktioniert nicht auf Mac El Capitan
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb --with-pg-config=/Users/ricardolopes/Developer/homebrew/bin/pg_config Using config values from /Users/ricardolopes/Developer/homebrew/bin/pg_config checking for libpq-fe.h... yes checking for libpq/libpq-fs.h... yes checking for pg_config_manual.h... yes checking for PQconnectdb() in -lpq... no checking for PQconnectdb() in -llibpq... no checking for PQconnectdb() in -lms/libpq... no Can't find the PostgreSQL client library (libpq) *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby --with-pg --without-pg --enable-windows-cross --disable-windows-cross --with-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}/ --with-pqlib --without-pqlib --with-libpqlib --without-libpqlib --with-ms/libpqlib --without-ms/libpqlib Gem files will remain installed in /Users/ricardolopes/Code/site-noticias/vendor/bundle/ruby/2.0.0/gems/pg-0.18.3 for inspection. Results logged to /Users/ricardolopes/Code/site-noticias/vendor/bundle/ruby/2.0.0/gems/pg-0.18.3/ext/gem_make.out An error occurred while installing pg (0.18.3), and Bundler cannot continue. Make sure that gem install pg -v '0.18.3' succeeds before bundling.
Ich habe versucht:
ARCHFLAGS="-arch x86_64" gem install pg
Als ich versuchte, ARCHFLAGS = "- Bogen x86_64" Juwel pg installieren ich habe:
Building native extensions. This could take a while... Successfully installed pg-0.18.3 invalid options: -f fivefish (invalid options are ignored) Parsing documentation for pg-0.18.3 Done installing documentation for pg after 3 seconds 1 gem installed
Aber ich laufen Paket installieren und erhalten Sie den gleichen Fehler am Anfang dieses Beitrags veröffentlicht.
Ich habe versucht, PostgresSQL von brauen wieder zu installieren. Ich habe fast alles ausprobiert, was ich bei Stack Overflow gefunden habe.
Sie haben wahrscheinlich Recht, aber sogar sqlite3 zu meiner Entwicklungsgruppe hinzufügen, Rails bestehen in der Installation pg gem ... '# Verwenden Sie sqlite3 als die Datenbank für Active Record Edelstein 'sqlite3', Gruppe:: Entwicklung' und tat dies auch: 'Gruppe: Entwicklung do # Zugriff auf eine IRB-Konsole auf Ausnahmeseiten oder durch Verwendung von <% = Konsole%> in Ansichten Edelstein 'Web-Konsole', '~> 2.0' Edelstein 'sqlite3' # Federgeschwindigkeiten Entwicklung, indem Sie Ihre Anwendung im Hintergrund laufen lassen. Lesen Sie mehr: https://github.com/rails/spring gem 'Frühling' Ende Gruppe: Produktion tun \t gem 'pg' \t gem 'rails_12factor' end' ohne Erfolg ... –
Diese wird nicht empfohlen, wenn Sie versuchen, eine 12-Faktor-App zu entwickeln, da dies die Dev- und Prod-Umgebungen divergent macht. http: // 12faktor.net/dev-prod-parity – NateSHolland
@NateSHolland hat Recht, Sie sollten nie verschiedene db-Engines für prod und dev verwenden, schlechte Idee. – SsouLlesS