Ruby on rails 找不到rake,但安装了gem。已经进行了捆绑包更新等

Ruby on rails 找不到rake,但安装了gem。已经进行了捆绑包更新等,ruby-on-rails,ruby,sqlite,Ruby On Rails,Ruby,Sqlite,我正在尝试运行bundle-exec-rake-db:migrate,并且已经运行了一段时间了,我一直遇到这个问题。有什么想法吗?我已经尝试过bundle安装、bundle更新等。我也附加了我的gemfile,以便您可以看到。可能是我的gemfile.lock有问题吗 sample_app LMagnotti$ bundle exec rake db:migrate Could not find rake-11.1.2 in any of the sources Run `bundle inst

我正在尝试运行bundle-exec-rake-db:migrate,并且已经运行了一段时间了,我一直遇到这个问题。有什么想法吗?我已经尝试过bundle安装、bundle更新等。我也附加了我的gemfile,以便您可以看到。可能是我的gemfile.lock有问题吗

sample_app LMagnotti$ bundle exec rake db:migrate
Could not find rake-11.1.2 in any of the sources
Run `bundle install` to install missing gems.
Gemfile

source 'https://rubygems.org'
gem 'rails', '4.2.2'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'bootstrap-sass', '~> 3.2.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0' 
gem 'pg', '0.18.4'
gem 'rake', '11.1.2'

group :development do
  gem 'byebug'
  gem 'web-console', '~> 2.0'
  gem 'spring'
  gem 'sqlite3', '1.3.7'
end
文件锁

GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (4.2.2)
      actionpack (= 4.2.2)
      actionview (= 4.2.2)
      activejob (= 4.2.2)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 1.0, >= 1.0.5)
    actionpack (4.2.2)
      actionview (= 4.2.2)
      activesupport (= 4.2.2)
      rack (~> 1.6)
      rack-test (~> 0.6.2)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.1)
    actionview (4.2.2)
      activesupport (= 4.2.2)
      builder (~> 3.1)
      erubis (~> 2.7.0)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.1)
    activejob (4.2.2)
      activesupport (= 4.2.2)
      globalid (>= 0.3.0)
    activemodel (4.2.2)
      activesupport (= 4.2.2)
      builder (~> 3.1)
    activerecord (4.2.2)
      activemodel (= 4.2.2)
      activesupport (= 4.2.2)
      arel (~> 6.0)
    activesupport (4.2.2)
      i18n (~> 0.7)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.3, >= 0.3.4)
      tzinfo (~> 1.1)
    arel (6.0.3)
    binding_of_caller (0.7.2)
      debug_inspector (>= 0.0.1)
    bootstrap-sass (3.2.0.2)
      sass (~> 3.2)
    builder (3.2.2)
    byebug (9.0.3)
    coffee-rails (4.1.1)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0, < 5.1.x)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.10.0)
    concurrent-ruby (1.0.2)
    debug_inspector (0.0.2)
    erubis (2.7.0)
    execjs (2.6.0)
    globalid (0.3.6)
      activesupport (>= 4.1.0)
    i18n (0.7.0)
    jbuilder (2.4.1)
      activesupport (>= 3.0.0, < 5.1)
      multi_json (~> 1.2)
    jquery-rails (4.1.1)
      rails-dom-testing (>= 1, < 3)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    json (1.8.3)
    loofah (2.0.3)
      nokogiri (>= 1.5.9)
    mail (2.6.4)
      mime-types (>= 1.16, < 4)
    mime-types (3.0)
      mime-types-data (~> 3.2015)
    mime-types-data (3.2016.0221)
    mini_portile2 (2.0.0)
    minitest (5.8.4)
    multi_json (1.12.0)
    nokogiri (1.6.7.2)
      mini_portile2 (~> 2.0.0.rc2)
    pg (0.18.4)
    rack (1.6.4)
    rack-test (0.6.3)
      rack (>= 1.0)
    rails (4.2.2)
      actionmailer (= 4.2.2)
      actionpack (= 4.2.2)
      actionview (= 4.2.2)
      activejob (= 4.2.2)
      activemodel (= 4.2.2)
      activerecord (= 4.2.2)
      activesupport (= 4.2.2)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.2.2)
      sprockets-rails
    rails-deprecated_sanitizer (1.0.3)
      activesupport (>= 4.2.0.alpha)
    rails-dom-testing (1.0.7)
      activesupport (>= 4.2.0.beta, < 5.0)
      nokogiri (~> 1.6.0)
      rails-deprecated_sanitizer (>= 1.0.1)
    rails-html-sanitizer (1.0.3)
      loofah (~> 2.0)
    railties (4.2.2)
      actionpack (= 4.2.2)
      activesupport (= 4.2.2)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (11.1.2)
    rdoc (4.2.2)
      json (~> 1.4)
    sass (3.4.22)
    sass-rails (5.0.4)
      railties (>= 4.0.0, < 5.0)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (>= 1.1, < 3)
    sdoc (0.4.1)
      json (~> 1.7, >= 1.7.7)
      rdoc (~> 4.0)
    spring (1.7.1)
    sprockets (3.6.0)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.0.4)
      actionpack (>= 4.0)
      activesupport (>= 4.0)
      sprockets (>= 3.0.0)
    sqlite3 (1.3.7)
    thor (0.19.1)
    thread_safe (0.3.5)
    tilt (2.0.4)
    turbolinks (2.5.3)
      coffee-rails
    tzinfo (1.2.2)
      thread_safe (~> 0.1)
    uglifier (3.0.0)
      execjs (>= 0.3.0, < 3)
    web-console (2.3.0)
      activemodel (>= 4.0)
      binding_of_caller (>= 0.7.2)
      railties (>= 4.0)
      sprockets-rails (>= 2.0, < 4.0)

PLATFORMS
  ruby

DEPENDENCIES
  bootstrap-sass (~> 3.2.0.0)
  byebug
  coffee-rails (~> 4.1.0)
  jbuilder (~> 2.0)
  jquery-rails
  pg (= 0.18.4)
  rails (= 4.2.2)
  rake (= 11.1.2)
  sass-rails (~> 5.0)
  sdoc (~> 0.4.0)
  spring
  sqlite3 (= 1.3.7)
  turbolinks
  uglifier (>= 1.3.0)
  web-console (~> 2.0)

BUNDLED WITH
   1.12.0
当我现在运行bundle install时,我看到的是:

An error occurred while installing pg (0.18.4), and Bundler cannot continue.
Make sure that `gem install pg -v '0.18.4'` succeeds before bundling.
然后我安装了它

Building native extensions.  This could take a while...
Successfully installed pg-0.18.4
Parsing documentation for pg-0.18.4
Done installing documentation for pg after 2 seconds
1 gem installed
捆绑包更新后,我现在遇到以下错误:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/LMagnotti/workspace/sample_app/vendor/cache/ruby/2.0.0/gems/pg-0.18.4/ext
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20160516-9499-1ex1lm8.rb extconf.rb
checking for pg_config... yes
Using config values from /usr/local/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
    --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}/
    --with-pqlib
    --without-pqlib
    --with-libpqlib
    --without-libpqlib
    --with-ms/libpqlib
    --without-ms/libpqlib

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Users/LMagnotti/workspace/sample_app/vendor/cache/ruby/2.0.0/extensions/universal-darwin-15/2.0.0/pg-0.18.4/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/LMagnotti/workspace/sample_app/vendor/cache/ruby/2.0.0/gems/pg-0.18.4 for inspection.
Results logged to /Users/LMagnotti/workspace/sample_app/vendor/cache/ruby/2.0.0/extensions/universal-darwin-15/2.0.0/pg-0.18.4/gem_make.out
Installing tilt 2.0.4
Installing spring 1.7.1
Installing sqlite3 1.3.7 with native extensions
Installing rdoc 4.2.2
Installing tzinfo 1.2.2
Installing nokogiri 1.6.7.2 with native extensions
Installing rack-test 0.6.3
Installing mime-types 3.0
Installing binding_of_caller 0.7.2 with native extensions
Installing bootstrap-sass 3.2.0.2
Installing coffee-script 2.4.1
Installing uglifier 3.0.0
Installing sprockets 3.6.0
An error occurred while installing pg (0.18.4), and Bundler cannot continue.
Make sure that `gem install pg -v '0.18.4'` succeeds before bundling.
日志上写着:

find_executable: checking for pg_config... -------------------- yes

--------------------

"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0  -lpthread -ldl -lobjc "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0  -Wl,-rpath,/usr/local/lib -lpthread -ldl -lobjc "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main() {return 0;}
/* end */

find_header: checking for libpq-fe.h... -------------------- yes

"xcrun clang -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS  -arch i386 -arch x86_64  -c conftest.c"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <libpq-fe.h>
/* end */

--------------------

find_header: checking for libpq/libpq-fs.h... -------------------- yes

"xcrun clang -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS  -arch i386 -arch x86_64  -c conftest.c"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <libpq/libpq-fs.h>
/* end */

--------------------

find_header: checking for pg_config_manual.h... -------------------- yes

"xcrun clang -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS  -arch i386 -arch x86_64  -c conftest.c"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <pg_config_manual.h>
/* end */

--------------------

have_library: checking for PQconnectdb() in -lpq... -------------------- no

"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0 -lpq  -lpthread -ldl -lobjc "
ld: warning: ignoring file /usr/local/lib/libpq.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libpq.dylib
Undefined symbols for architecture i386:
  "_PQconnectdb", referenced from:
      _t in conftest-07e7b9.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <libpq-fe.h>
 4: 
 5: /*top*/
 6: extern int t(void);
 7: int t(void) { void ((*volatile p)()); p = (void ((*)()))PQconnectdb; return 0; }
 8: int main(int argc, char **argv)
 9: {
10:   if (argc > 1000000) {
11:     printf("%p", &t);
12:   }
13: 
14:   return 0;
15: }
/* end */

"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0 -lpq  -lpthread -ldl -lobjc "
conftest.c:7:27: error: too few arguments to function call, single argument 'conninfo' was not specified
int t(void) { PQconnectdb(); return 0; }
              ~~~~~~~~~~~ ^
/usr/local/Cellar/postgresql/9.5.2/include/libpq-fe.h:250:1: note: 'PQconnectdb' declared here
extern PGconn *PQconnectdb(const char *conninfo);
^
1 error generated.
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <libpq-fe.h>
 4: 
 5: /*top*/
 6: extern int t(void);
 7: int t(void) { PQconnectdb(); return 0; }
 8: int main(int argc, char **argv)
 9: {
10:   if (argc > 1000000) {
11:     printf("%p", &t);
12:   }
13: 
14:   return 0;
15: }
/* end */

--------------------

have_library: checking for PQconnectdb() in -llibpq... -------------------- no

"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0 -llibpq  -lpthread -ldl -lobjc "
ld: library not found for -llibpq
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <libpq-fe.h>
 4: 
 5: /*top*/
 6: extern int t(void);
 7: int t(void) { void ((*volatile p)()); p = (void ((*)()))PQconnectdb; return 0; }
 8: int main(int argc, char **argv)
 9: {
10:   if (argc > 1000000) {
11:     printf("%p", &t);
12:   }
13: 
14:   return 0;
15: }
/* end */

"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0 -llibpq  -lpthread -ldl -lobjc "
conftest.c:7:27: error: too few arguments to function call, single argument 'conninfo' was not specified
int t(void) { PQconnectdb(); return 0; }
              ~~~~~~~~~~~ ^
/usr/local/Cellar/postgresql/9.5.2/include/libpq-fe.h:250:1: note: 'PQconnectdb' declared here
extern PGconn *PQconnectdb(const char *conninfo);
^
1 error generated.
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <libpq-fe.h>
 4: 
 5: /*top*/
 6: extern int t(void);
 7: int t(void) { PQconnectdb(); return 0; }
 8: int main(int argc, char **argv)
 9: {
10:   if (argc > 1000000) {
11:     printf("%p", &t);
12:   }
13: 
14:   return 0;
15: }
/* end */

--------------------

have_library: checking for PQconnectdb() in -lms/libpq... -------------------- no

"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0 -lms/libpq  -lpthread -ldl -lobjc "
ld: library not found for -lms/libpq
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <libpq-fe.h>
 4: 
 5: /*top*/
 6: extern int t(void);
 7: int t(void) { void ((*volatile p)()); p = (void ((*)()))PQconnectdb; return 0; }
 8: int main(int argc, char **argv)
 9: {
10:   if (argc > 1000000) {
11:     printf("%p", &t);
12:   }
13: 
14:   return 0;
15: }
/* end */

"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0 -lms/libpq  -lpthread -ldl -lobjc "
conftest.c:7:27: error: too few arguments to function call, single argument 'conninfo' was not specified
int t(void) { PQconnectdb(); return 0; }
              ~~~~~~~~~~~ ^
/usr/local/Cellar/postgresql/9.5.2/include/libpq-fe.h:250:1: note: 'PQconnectdb' declared here
extern PGconn *PQconnectdb(const char *conninfo);
^
1 error generated.
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <libpq-fe.h>
 4: 
 5: /*top*/
 6: extern int t(void);
 7: int t(void) { PQconnectdb(); return 0; }
 8: int main(int argc, char **argv)
 9: {
10:   if (argc > 1000000) {
11:     printf("%p", &t);
12:   }
13: 
14:   return 0;
15: }
/* end */

--------------------
find_可执行文件:检查pg_配置…------------对
--------------------
“xcrun clang-o conftest-I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/Ruby-2.0/universal-darwin15-I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/Ruby-2.0.0-I/usr/local/cell/postgresql/9.5.2/include-D_XOPEN_SOURCE-D_DARWIN_C_SOURCE-D_DARWIN_UNLIMITED_SELECT-D_REENTRANT-g-Os-pipe-DHAVE_GCC_SYNC_BUILTINS conftest.C-L-L-L-L-L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/local/lib-L-L-L-L/usr/local/lib-arch i386-arch x86-arch x86-u 64-lruby.2.0.0-lpthread-ldl-lobjc“
检查的程序是:
/*开始*/
1:#包括“ruby.h”
2: 
3:int main(int argc,字符**argv)
4: {
5:返回0;
6: }
/*结束*/
“xcrun clang-o conftest-I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/Ruby-2.0/universal-darwin15-I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/Ruby-2.0.0-I/usr/local/cell/postgresql/9.5.2/include-D_XOPEN_SOURCE-D_DARWIN_C_SOURCE-D_DARWIN_UNLIMITED_SELECT-D_REENTRANT-g-Os-pipe-DHAVE_GCC_SYNC_BUILTINS conftest.C-L-L-L-L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib-L-L/usr/local/lib-L-L-L/usr/local/lib-L/lib-i386-arch x86-lx86-lp64-lruby.2.0.0-Wl-rpath、/usr/rpath、/usr/local/local/lib
检查的程序是:
/*开始*/
1:#包括“ruby.h”
2: 
3:int main(){return 0;}
/*结束*/
find_头:检查libpq fe.h..-------对
“xcrun clang-I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/Ruby-2.0.0/universal-darwin15-I/System/Library/Frameworks/Ruby.Frameworks/2.0/usr/Frameworks/include/Ruby-2.0/usr/include/Versions/Ruby-2.0.0-I.-I/usr/local/cillar/postgresql/9.5.2/include-D_XOPEN\SOURCE-D_DARWIN_C_SOURCE-D_DARWIN_UNLIMITED_SELECT-D_REENTRANT-g-Os-pipe-DHAVE_GCC_SYNC_BUILTINS-arch i386-arch x86_64-C conftest.C“
检查的程序是:
/*开始*/
1:#包括“ruby.h”
2: 
3:#包括
/*结束*/
--------------------
find_头:检查libpq/libpq fs.h..-------对
“xcrun clang-I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/Ruby-2.0.0/universal-darwin15-I/System/Library/Frameworks/Ruby.Frameworks/2.0/usr/Frameworks/include/Ruby-2.0/usr/include/Versions/Ruby-2.0.0-I.-I/usr/local/cillar/postgresql/9.5.2/include-D_XOPEN\SOURCE-D_DARWIN_C_SOURCE-D_DARWIN_UNLIMITED_SELECT-D_REENTRANT-g-Os-pipe-DHAVE_GCC_SYNC_BUILTINS-arch i386-arch x86_64-C conftest.C“
检查的程序是:
/*开始*/
1:#包括“ruby.h”
2: 
3:#包括
/*结束*/
--------------------
查找页眉:检查pg\u config\u manual.h..-------对
“xcrun clang-I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/Ruby-2.0.0/universal-darwin15-I/System/Library/Frameworks/Ruby.Frameworks/2.0/usr/Frameworks/include/Ruby-2.0/usr/include/Versions/Ruby-2.0.0-I.-I/usr/local/cillar/postgresql/9.5.2/include-D_XOPEN\SOURCE-D_DARWIN_C_SOURCE-D_DARWIN_UNLIMITED_SELECT-D_REENTRANT-g-Os-pipe-DHAVE_GCC_SYNC_BUILTINS-arch i386-arch x86_64-C conftest.C“
检查的程序是:
/*开始*/
1:#包括“ruby.h”
2: 
3:#包括
/*结束*/
--------------------
have_library:正在-lpq中检查PQconnectdb()不
“xcrun clang-o conftest-I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/Ruby-2.0/universal-darwin15-I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/Ruby-2.0.0-I/usr/local/cell/postgresql/9.5.2/include-D_XOPEN_SOURCE-D_DARWIN_C_SOURCE-D_DARWIN_UNLIMITED_SELECT-D_REENTRANT-g-Os-pipe-DHAVE_GCC_SYNC_-BUILTINS conftest.C-L-L-L-L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/local/lib-L-L-L-L-L/usr/local/lib-Wl-rpath、/usr/local/lib/lib-arch i386-arch x86-arch x86-lruby.2.0.0.0-q-lp-ldl-lob-jc
ld:警告:忽略文件/usr/local/lib/libpq.dylib,该文件是为x86_64生成的,它不是要链接的体系结构(i386):/usr/local/lib/libpq.dylib
架构i386的未定义符号:
“_PQconnectdb”,引用自:
_测试-07e7b9.o中的t
ld:未找到架构i386的符号
叮当声:错误:链接器命令失败,退出代码为1(使用-v查看调用)
检查的程序是:
/*开始*/
1:#包括“ruby.h”
2: 
3:#包括
4: 
5:/*顶部*/
6:外部内部t(无效);
7:int t(void){void((*volatile p)();p=(void((*)())PQconnectdb;返回0;}
8:int main(int argc,字符**argv)
9: {
10:如果(argc>1000000){
11:printf(“%p”和“t”);
12:   }
13: 
14:返回0;
15: }
/*结束*/
“xcrun clang-o conftest-I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/Ruby-2.0/universal-darwin15-I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/Ruby-2.0.0/I/usr/local/Cella
find_executable: checking for pg_config... -------------------- yes

--------------------

"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0  -lpthread -ldl -lobjc "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0  -Wl,-rpath,/usr/local/lib -lpthread -ldl -lobjc "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main() {return 0;}
/* end */

find_header: checking for libpq-fe.h... -------------------- yes

"xcrun clang -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS  -arch i386 -arch x86_64  -c conftest.c"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <libpq-fe.h>
/* end */

--------------------

find_header: checking for libpq/libpq-fs.h... -------------------- yes

"xcrun clang -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS  -arch i386 -arch x86_64  -c conftest.c"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <libpq/libpq-fs.h>
/* end */

--------------------

find_header: checking for pg_config_manual.h... -------------------- yes

"xcrun clang -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS  -arch i386 -arch x86_64  -c conftest.c"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <pg_config_manual.h>
/* end */

--------------------

have_library: checking for PQconnectdb() in -lpq... -------------------- no

"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0 -lpq  -lpthread -ldl -lobjc "
ld: warning: ignoring file /usr/local/lib/libpq.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libpq.dylib
Undefined symbols for architecture i386:
  "_PQconnectdb", referenced from:
      _t in conftest-07e7b9.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <libpq-fe.h>
 4: 
 5: /*top*/
 6: extern int t(void);
 7: int t(void) { void ((*volatile p)()); p = (void ((*)()))PQconnectdb; return 0; }
 8: int main(int argc, char **argv)
 9: {
10:   if (argc > 1000000) {
11:     printf("%p", &t);
12:   }
13: 
14:   return 0;
15: }
/* end */

"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0 -lpq  -lpthread -ldl -lobjc "
conftest.c:7:27: error: too few arguments to function call, single argument 'conninfo' was not specified
int t(void) { PQconnectdb(); return 0; }
              ~~~~~~~~~~~ ^
/usr/local/Cellar/postgresql/9.5.2/include/libpq-fe.h:250:1: note: 'PQconnectdb' declared here
extern PGconn *PQconnectdb(const char *conninfo);
^
1 error generated.
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <libpq-fe.h>
 4: 
 5: /*top*/
 6: extern int t(void);
 7: int t(void) { PQconnectdb(); return 0; }
 8: int main(int argc, char **argv)
 9: {
10:   if (argc > 1000000) {
11:     printf("%p", &t);
12:   }
13: 
14:   return 0;
15: }
/* end */

--------------------

have_library: checking for PQconnectdb() in -llibpq... -------------------- no

"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0 -llibpq  -lpthread -ldl -lobjc "
ld: library not found for -llibpq
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <libpq-fe.h>
 4: 
 5: /*top*/
 6: extern int t(void);
 7: int t(void) { void ((*volatile p)()); p = (void ((*)()))PQconnectdb; return 0; }
 8: int main(int argc, char **argv)
 9: {
10:   if (argc > 1000000) {
11:     printf("%p", &t);
12:   }
13: 
14:   return 0;
15: }
/* end */

"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0 -llibpq  -lpthread -ldl -lobjc "
conftest.c:7:27: error: too few arguments to function call, single argument 'conninfo' was not specified
int t(void) { PQconnectdb(); return 0; }
              ~~~~~~~~~~~ ^
/usr/local/Cellar/postgresql/9.5.2/include/libpq-fe.h:250:1: note: 'PQconnectdb' declared here
extern PGconn *PQconnectdb(const char *conninfo);
^
1 error generated.
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <libpq-fe.h>
 4: 
 5: /*top*/
 6: extern int t(void);
 7: int t(void) { PQconnectdb(); return 0; }
 8: int main(int argc, char **argv)
 9: {
10:   if (argc > 1000000) {
11:     printf("%p", &t);
12:   }
13: 
14:   return 0;
15: }
/* end */

--------------------

have_library: checking for PQconnectdb() in -lms/libpq... -------------------- no

"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0 -lms/libpq  -lpthread -ldl -lobjc "
ld: library not found for -lms/libpq
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <libpq-fe.h>
 4: 
 5: /*top*/
 6: extern int t(void);
 7: int t(void) { void ((*volatile p)()); p = (void ((*)()))PQconnectdb; return 0; }
 8: int main(int argc, char **argv)
 9: {
10:   if (argc > 1000000) {
11:     printf("%p", &t);
12:   }
13: 
14:   return 0;
15: }
/* end */

"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0 -lms/libpq  -lpthread -ldl -lobjc "
conftest.c:7:27: error: too few arguments to function call, single argument 'conninfo' was not specified
int t(void) { PQconnectdb(); return 0; }
              ~~~~~~~~~~~ ^
/usr/local/Cellar/postgresql/9.5.2/include/libpq-fe.h:250:1: note: 'PQconnectdb' declared here
extern PGconn *PQconnectdb(const char *conninfo);
^
1 error generated.
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <libpq-fe.h>
 4: 
 5: /*top*/
 6: extern int t(void);
 7: int t(void) { PQconnectdb(); return 0; }
 8: int main(int argc, char **argv)
 9: {
10:   if (argc > 1000000) {
11:     printf("%p", &t);
12:   }
13: 
14:   return 0;
15: }
/* end */

--------------------
Can't find the PostgreSQL client library (libpq)
...
ld: warning: ignoring file /usr/local/lib/libpq.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libpq.dylib