Note that there are some explanatory texts on larger screens.

plurals
  1. POpg gem not possible to be installed with bundle install or at all
    primarykey
    data
    text
    <p>i'm trying to install pg gem. I'm a total beginner to ruby on rails and to programming at all. I'm trying to figure that error out since yesterday and already looked at many places for a solution. hope you can help me. thanks using mac mountain lion ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0] and used to use rails 4.0 Marcs-MacBook-Pro:smartforce marcboehle$ rails -v Could not find pg-0.16.0 in any of the sources Run <code>bundle install</code> to install missing gems.</p> <p>I already tried:</p> <pre><code>Marcs-MacBook-Pro:smartforce marcboehle$ bundle install Fetching gem metadata from http://rubygems.org/.......... Fetching gem metadata from http://rubygems.org/.. Resolving dependencies... Enter your password to install the bundled RubyGems to your system: Using rake (10.1.0) Using i18n (0.6.5) Using minitest (4.7.5) Using multi_json (1.7.9) Using atomic (1.1.13) Using thread_safe (0.1.2) Using tzinfo (0.3.37) Using activesupport (4.0.0) Using builder (3.1.4) Using erubis (2.7.0) Using rack (1.5.2) Using rack-test (0.6.2) Using actionpack (4.0.0) Using mime-types (1.24) Using polyglot (0.3.3) Using treetop (1.4.15) Using mail (2.5.4) Using actionmailer (4.0.0) Using activemodel (4.0.0) Using activerecord-deprecated_finders (1.0.3) Using arel (4.0.0) Using activerecord (4.0.0) Using bundler (1.3.5) Installing coffee-script-source (1.6.3) Installing execjs (2.0.0) Installing coffee-script (2.2.0) Using thor (0.18.1) Using railties (4.0.0) Installing coffee-rails (4.0.0) Using hike (1.2.3) Installing jbuilder (1.5.0) Installing jquery-rails (3.0.4) Installing json (1.8.0) Installing pg (0.16.0) Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/local/rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb checking for pg_config... yes Using config values from /usr/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... yes checking for PQconnectionUsedPassword()... yes checking for PQisthreadsafe()... yes checking for PQprepare()... yes checking for PQexecParams()... yes checking for PQescapeString()... yes checking for PQescapeStringConn()... yes checking for PQescapeLiteral()... yes checking for PQescapeIdentifier()... yes checking for PQgetCancel()... yes checking for lo_create()... yes checking for pg_encoding_to_char()... yes checking for pg_char_to_encoding()... yes checking for PQsetClientEncoding()... yes checking for PQlibVersion()... yes checking for PQping()... yes checking for PQsetSingleRowMode()... no checking for rb_encdb_alias()... yes checking for rb_enc_alias()... yes checking for rb_thread_call_without_gvl()... yes checking for rb_thread_call_with_gvl()... yes checking for rb_thread_fd_select()... yes checking for rb_w32_wrap_io_handle()... no checking for PGRES_COPY_BOTH in libpq-fe.h... no checking for PGRES_SINGLE_TUPLE in libpq-fe.h... no checking for PG_DIAG_TABLE_NAME in libpq-fe.h... no checking for struct pgNotify.extra in libpq-fe.h... yes checking for unistd.h... yes checking for ruby/st.h... yes creating extconf.h creating Makefile make "DESTDIR=" compiling gvl_wrappers.c compiling pg.c pg.c:272:9: warning: implicit declaration of function 'PQlibVersion' is invalid in C99 [-Wimplicit-function-declaration] return INT2NUM(PQlibVersion()); ^ In file included from pg.c:48: In file included from ./pg.h:17: In file included from /usr/local/rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/ruby.h:33: /usr/local/rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/ruby/ruby.h:1167:21: note: instantiated from: # define INT2NUM(v) INT2FIX((int)(v)) ^ pg.c:272:9: note: instantiated from: return INT2NUM(PQlibVersion()); ^ pg.c:272:17: note: instantiated from: return INT2NUM(PQlibVersion()); ^ pg.c:375:48: error: use of undeclared identifier 'PQPING_OK' rb_define_const(rb_mPGconstants, "PQPING_OK", INT2FIX(PQPING_OK)); ^ pg.c:375:56: note: instantiated from: rb_define_const(rb_mPGconstants, "PQPING_OK", INT2FIX(PQPING_OK)); ^ pg.c:377:52: error: use of undeclared identifier 'PQPING_REJECT' rb_define_const(rb_mPGconstants, "PQPING_REJECT", INT2FIX(PQPING_REJECT)); ^ pg.c:377:60: note: instantiated from: rb_define_const(rb_mPGconstants, "PQPING_REJECT", INT2FIX(PQPING_REJECT)); ^ pg.c:379:57: error: use of undeclared identifier 'PQPING_NO_RESPONSE' rb_define_const(rb_mPGconstants, "PQPING_NO_RESPONSE", INT2FIX(PQPING_NO_RESPONSE)); ^ pg.c:379:65: note: instantiated from: rb_define_const(rb_mPGconstants, "PQPING_NO_RESPONSE", INT2FIX(PQPING_NO_RESPONSE)); ^ pg.c:381:56: error: use of undeclared identifier 'PQPING_NO_ATTEMPT' rb_define_const(rb_mPGconstants, "PQPING_NO_ATTEMPT", INT2FIX(PQPING_NO_ATTEMPT)); ^ pg.c:381:64: note: instantiated from: rb_define_const(rb_mPGconstants, "PQPING_NO_ATTEMPT", INT2FIX(PQPING_NO_ATTEMPT)); ^ 1 warning and 4 errors generated. make: *** [pg.o] Error 1 Gem files will remain installed in /Users/marcboehle/.bundler/tmp/25873/gems/pg-0.16.0 for inspection. Results logged to /Users/marcboehle/.bundler/tmp/25873/gems/pg-0.16.0/ext/gem_make.out An error occurred while installing pg (0.16.0), and Bundler cannot continue. Make sure that `gem install pg -v '0.16.0'` succeeds before bundling. </code></pre> <p>next i tried: </p> <pre><code>Marcs-MacBook-Pro:smartforce marcboehle$ sudo gem install pg Password: Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension. /usr/local/rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb checking for pg_config... yes Using config values from /usr/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... yes checking for PQconnectionUsedPassword()... yes checking for PQisthreadsafe()... yes checking for PQprepare()... yes checking for PQexecParams()... yes checking for PQescapeString()... yes checking for PQescapeStringConn()... yes checking for PQescapeLiteral()... yes checking for PQescapeIdentifier()... yes checking for PQgetCancel()... yes checking for lo_create()... yes checking for pg_encoding_to_char()... yes checking for pg_char_to_encoding()... yes checking for PQsetClientEncoding()... yes checking for PQlibVersion()... yes checking for PQping()... yes checking for PQsetSingleRowMode()... no checking for rb_encdb_alias()... yes checking for rb_enc_alias()... yes checking for rb_thread_call_without_gvl()... yes checking for rb_thread_call_with_gvl()... yes checking for rb_thread_fd_select()... yes checking for rb_w32_wrap_io_handle()... no checking for PGRES_COPY_BOTH in libpq-fe.h... no checking for PGRES_SINGLE_TUPLE in libpq-fe.h... no checking for PG_DIAG_TABLE_NAME in libpq-fe.h... no checking for struct pgNotify.extra in libpq-fe.h... yes checking for unistd.h... yes checking for ruby/st.h... yes creating extconf.h creating Makefile make "DESTDIR=" compiling gvl_wrappers.c compiling pg.c pg.c:272:9: warning: implicit declaration of function 'PQlibVersion' is invalid in C99 [-Wimplicit-function-declaration] return INT2NUM(PQlibVersion()); ^ In file included from pg.c:48: In file included from ./pg.h:17: In file included from /usr/local/rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/ruby.h:33: /usr/local/rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/ruby/ruby.h:1167:21: note: instantiated from: # define INT2NUM(v) INT2FIX((int)(v)) ^ pg.c:272:9: note: instantiated from: return INT2NUM(PQlibVersion()); ^ pg.c:272:17: note: instantiated from: return INT2NUM(PQlibVersion()); ^ pg.c:375:48: error: use of undeclared identifier 'PQPING_OK' rb_define_const(rb_mPGconstants, "PQPING_OK", INT2FIX(PQPING_OK)); ^ pg.c:375:56: note: instantiated from: rb_define_const(rb_mPGconstants, "PQPING_OK", INT2FIX(PQPING_OK)); ^ pg.c:377:52: error: use of undeclared identifier 'PQPING_REJECT' rb_define_const(rb_mPGconstants, "PQPING_REJECT", INT2FIX(PQPING_REJECT)); ^ pg.c:377:60: note: instantiated from: rb_define_const(rb_mPGconstants, "PQPING_REJECT", INT2FIX(PQPING_REJECT)); ^ pg.c:379:57: error: use of undeclared identifier 'PQPING_NO_RESPONSE' rb_define_const(rb_mPGconstants, "PQPING_NO_RESPONSE", INT2FIX(PQPING_NO_RESPONSE)); ^ pg.c:379:65: note: instantiated from: rb_define_const(rb_mPGconstants, "PQPING_NO_RESPONSE", INT2FIX(PQPING_NO_RESPONSE)); ^ pg.c:381:56: error: use of undeclared identifier 'PQPING_NO_ATTEMPT' rb_define_const(rb_mPGconstants, "PQPING_NO_ATTEMPT", INT2FIX(PQPING_NO_ATTEMPT)); ^ pg.c:381:64: note: instantiated from: rb_define_const(rb_mPGconstants, "PQPING_NO_ATTEMPT", INT2FIX(PQPING_NO_ATTEMPT)); ^ 1 warning and 4 errors generated. make: *** [pg.o] Error 1 Gem files will remain installed in /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/pg-0.16.0 for inspection. Results logged to /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/pg-0.16.0/ext/gem_make.out </code></pre> <p>and then i gave the following a try:</p> <pre><code>Marcs-MacBook-Pro:smartforce marcboehle$ which pg_config /usr/bin/pg_config Marcs-MacBook-Pro:smartforce marcboehle$ gem install pg -- --with-pg-config= '/usr/bin/pg_config' ERROR: While executing gem ... (Errno::EACCES) Permission denied - /usr/local/rvm/gems/ruby-2.0.0-p247/gems/pg-0.16.0/.gemtest Marcs-MacBook-Pro:smartforce marcboehle$ sudo apt-get install libpq-dev Password: sudo: apt-get: command not found Marcs-MacBook-Pro:smartforce marcboehle$ sudo install libpq-dev usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 file2 install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 ... fileN directory install -d [-v] [-g group] [-m mode] [-o owner] directory ... Marcs-MacBook-Pro:smartforce marcboehle$ sudo apt-get install postgresql-client libpq5 libpq-dev sudo: apt-get: command not found Marcs-MacBook-Pro:smartforce marcboehle$ sudo gem install pg ERROR: Could not find a valid gem 'pg' (&gt;= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read server session ticket A (https://rubygems.org/latest_specs.4.8.gz) ERROR: Possible alternatives: pg Marcs-MacBook-Pro:smartforce marcboehle$ rails -v Could not find pg-0.16.0 in any of the sources Run `bundle install` to install missing gems. Marcs-MacBook-Pro:smartforce marcboehle$ ruby -v ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0] Marcs-MacBook-Pro:smartforce marcboehle$ rails -v Could not find pg-0.16.0 in any of the sources Run `bundle install` to install missing gems. </code></pre> <p>EDIT</p> <p>Thanks for your comments, i tried to install postgres which led to the following problems. any suggestions or can you recommend a tutorial how i can delete everything connected to the whole ruby on rails, rvm, homebrew and whatever i installed. Then i would love to reinstall everything clean from the beginning. otherwise can you help me out with a explanation what i need to do with the "Path" i need to do anything with. i'm a total rooky.</p> <pre><code>An error occurred while installing pg (0.16.0), and Bundler cannot continue. Make sure that `gem install pg -v '0.16.0'` succeeds before bundling. Marcs-MacBook-Pro:smartforce marcboehle$ brew update Updated Homebrew from 424c84c5 to 9e01e61d. ==&gt; New Formulae clojurescript libgsm snzip voltdb dmalloc libresample stlviewer dtrx randomize-lines tlassemble juju reaver tractorgen ==&gt; Updated Formulae abcl isl ace iso-codes aircrack-ng ispc appledoc ispell aspell jenkins autoconf jsvc automake klavaro bash kytea boost lcdf-typetools botan ldid bullet leiningen calc lesstif camlp5 libcouchbase cantera libdiscid casperjs libdlna chruby libfreenect classads libmagic cpanminus libquvi cppcheck llvm css-crush logentries csync lpc21isp cyassl mackup denominator macvim djvulibre madplay drush mariadb dub matlab2tikz duti mksh eet mlton eina mongodb ejabberd monotone elixir mr embryo mspdebug eprover mysql exiftool mysql-cluster fb-client mysql-connector-odbc fdk-aac nasm findbugs netcdf flac netpbm fontforge nexus fox node fwknop open-scene-graph gdal openssl gearman parrot geos passenger getmail pcre++ gettext percona-server gfortran perl-build git pgbadger gle pgtap glm pngquant gnupg2 poppler go postgis gobject-introspection postgresql gpg-agent proguard grass py2cairo gst-libav pypy gst-plugins-bad python gst-plugins-base python3 gst-plugins-good qemu gst-plugins-ugly quantlib gstreamer rabbitmq hevea rabbitmq-c hiredis reattach-to-user-namespace hydra redis icu4c rethinkdb ircd-hybrid riak rpm tiger-vnc rrdtool transmission rtmpdump uwsgi ruby vifm saxon vimpc sbcl voldemort sdl2 watchman ser2net wine serf wkhtmltopdf silk wxmac smartmontools xmlto socat xpa sonar xrootd sonar-runner yarp sqsh yaws ssdeep ydict storm youtube-dl subversion zabbix svtplay-dl zookeeper swi-prolog zsh-completions tbb zsh-syntax-highlighting terminal-notifier ==&gt; Deleted Formulae clojure Marcs-MacBook-Pro:smartforce marcboehle$ brew doctor Warning: Some directories in /usr/local/share/man aren't writable. This can happen if you "sudo make install" software that isn't managed by Homebrew. If a brew tries to add locale information to one of these directories, then the install will fail during the link step. You should probably `chown` them: /usr/local/share/man/man7 Warning: "config" scripts exist outside your system or Homebrew directories. `./configure` scripts often look for *-config scripts to determine if software packages are installed, and what additional flags to use when compiling and linking. Having additional scripts in your path can confuse software installed via Homebrew if the config script overrides a system or Homebrew provided script of the same name. We found the following "config" scripts: /opt/sm/pkg/active/bin/curl-config /opt/sm/pkg/active/bin/ncurses5-config /opt/sm/pkg/active/bin/ncursesw5-config /opt/sm/pkg/active/bin/pkg-config /opt/sm/pkg/active/bin/xml2-config /opt/sm/pkg/active/bin/xslt-config Warning: An outdated version of Git was detected in your PATH. Git 1.7.10 or newer is required to perform checkouts over HTTPS from GitHub. Please upgrade: brew upgrade git Warning: You have MacPorts or Fink installed: /opt/local/bin/port This can cause trouble. You don't have to uninstall them, but you may want to temporarily move them out of the way, e.g. sudo mv /opt/local ~/macports Warning: Your compilers are different from the standard versions for your Xcode. If you have Xcode 4.3 or newer, you should install the Command Line Tools for Xcode from within Xcode's Download preferences. Otherwise, you should reinstall Xcode. Warning: /usr/bin occurs before /usr/local/bin This means that system-provided programs will be used instead of those provided by Homebrew. The following tools exist at both paths: git git-cvsserver git-receive-pack git-shell git-upload-archive git-upload-pack Consider amending your PATH so that /usr/local/bin occurs before /usr/bin in your PATH. Marcs-MacBook-Pro:smartforce marcboehle$ brew upgrade git Warning: It appears you have MacPorts or Fink installed. Software installed with other package managers causes known problems for Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again. Error: git not installed Marcs-MacBook-Pro:smartforce marcboehle$ sudo mv /opt/local ~/macports Marcs-MacBook-Pro:smartforce marcboehle$ brew upgrade git Error: git not installed Marcs-MacBook-Pro:smartforce marcboehle$ brew install git ==&gt; Downloading http://git-core.googlecode.com/files/git-1.8.3.4.tar.gz ######################################################################## 100,0% ==&gt; make prefix=/usr/local/Cellar/git/1.8.3.4 sysconfdir=/usr/local/etc CC=cc CF ==&gt; make CC=cc CFLAGS= LDFLAGS= git-credential-osxkeychain.c:131: error: ‘protocol’ undeclared (first use in this function) git-credential-osxkeychain.c:131: error: ‘kSecProtocolTypeHTTPS’ undeclared (first use in this function) git-credential-osxkeychain.c:133: error: ‘kSecProtocolTypeHTTP’ undeclared (first use in this function) git-credential-osxkeychain.c:141: error: ‘port’ undeclared (first use in this function) make: *** [git-credential-osxkeychain.o] Error 1 READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting These open issues may also help: https://github.com/mxcl/homebrew/issues/21998 https://github.com/mxcl/homebrew/issues/21530 https://github.com/mxcl/homebrew/pull/17713 https://github.com/mxcl/homebrew/pull/20260 Marcs-MacBook-Pro:smartforce marcboehle$ brew upgrade git Error: git not installed Marcs-MacBook-Pro:smartforce marcboehle$ </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload