繁体   English   中英

在Mac上安装do_postgres

[英]Install do_postgres on Mac

嗨,我一直在尝试安装我的Gemfile,但是每次我尝试都得到这个:

Fetching gem metadata from https://rubygems.org/.........
Fetching additional metadata from https://rubygems.org/..
Using addressable 2.3.5
Using backports 3.6.0
Using bcrypt 3.1.7
Using bcrypt-ruby 3.1.5
Using daemons 1.1.9
Using dm-core 1.2.1
Using dm-aggregates 1.2.0
Using dm-constraints 1.2.0
Using dm-migrations 1.2.0
Using fastercsv 1.5.5
Using json 1.8.1
Using json_pure 1.8.1
Using multi_json 1.9.2
Using dm-serializer 1.2.2
Using dm-timestamps 1.2.0
Using dm-transactions 1.2.0
Using stringex 1.5.1
Using uuidtools 2.1.4
Using dm-types 1.2.2
Using dm-validations 1.2.0
Using data_mapper 1.2.0
Using data_objects 0.10.14
Using dm-do-adapter 1.2.0

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

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb 
checking for main() in -lpq... yes
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for postgres.h... yes
checking for mb/pg_wchar.h... no
*** 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-pgsql-server-dir
    --without-pgsql-server-dir
    --with-pgsql-server-include
    --without-pgsql-server-include=${pgsql-server-dir}/include
    --with-pgsql-server-lib
    --without-pgsql-server-lib=${pgsql-server-dir}/
    --with-pgsql-client-dir
    --without-pgsql-client-dir
    --with-pgsql-client-include
    --without-pgsql-client-include=${pgsql-client-dir}/include
    --with-pgsql-client-lib
    --without-pgsql-client-lib=${pgsql-client-dir}/
    --with-pqlib
    --without-pqlib
Could not find PostgreSQL build environment (libraries & headers): Makefile not created

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/do_postgres-0.10.14 for         inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/do_postgres-0.10.14/gem_make.out
An error occurred while installing do_postgres (0.10.14), and Bundler cannot continue.
Make sure that `gem install do_postgres -v '0.10.14'` succeeds before bundling.        

我的Gemfile包含以下内容:

source 'https://rubygems.org'
ruby '2.0.0'

gem "sinatra"
gem "sinatra-contrib"
gem "sinatra-flash"
gem "thin"
gem 'data_mapper'
gem 'omniauth'
gem 'omniauth-google-oauth2'
gem 'omniauth-github'
gem 'sass'

group :development do
  gem 'dm-sqlite-adapter'
  gem 'do_sqlite3'
end

group :production do
  gem 'pg'
  gem 'dm-postgres-adapter' 
end

我尝试过手动安装postgres,但我已经将其安装在计算机上,但是它一直失败。 我正在运行Mac OSX Mavericks

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM