pg(0.12.1)没有安装在Heroku上

时间:2012-01-05 18:40:09

标签: ruby-on-rails postgresql heroku rails-postgresql

我做了一个捆绑更新。现在,我正在尝试将我的应用程序推送到Heroku,但它无法运行:

以下是我收到的错误:

   Installing pg (0.12.1) with native extensions /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:483:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

   /usr/ruby1.8.7/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 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 PQgetCancel()... yes
   checking for lo_create()... yes
   checking for pg_encoding_to_char()... yes
   checking for PQsetClientEncoding()... yes
   checking for rb_encdb_alias()... no
   checking for rb_enc_alias()... no
   checking for struct pgNotify.extra in libpq-fe.h... yes
   checking for unistd.h... yes
   checking for ruby/st.h... no
   pg currently requires the ruby/st.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=/usr/ruby1.8.7/bin/ruby
    --with-pg
    --without-pg
    --with-pg-dir
    --without-pg-dir
    --with-pg-include
    --without-pg-include=${pg-dir}/include
    --with-pg-lib
    --without-pg-lib=${pg-dir}/lib
    --with-pg-config
    --without-pg-config
    --with-pg_config
    --without-pg_config
    --with-pqlib
    --without-pqlib
    --enable-static-build
    --disable-static-build


   Gem files will remain installed in /disk1/tmp/build_2ss3rr1i4kv9j/.bundle/gems/ruby/1.8/gems/pg-0.12.1 for inspection.
   Results logged to /disk1/tmp/build_2ss3rr1i4kv9j/.bundle/gems/ruby/1.8/gems/pg-0.12.1/ext/gem_make.out
    from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:in `each'
    from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:in `build_extensions'
    from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:198:in `install'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/source.rb:95:in `install'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/installer.rb:55:in `run'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/installer.rb:44:in `run'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/installer.rb:8:in `install'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/cli.rb:225:in `install'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `send'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `run'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor.rb:246:in `dispatch'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in `start'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/bin/bundle:13
    from /usr/ruby1.8.7/bin/bundle:19:in `load'
    from /usr/ruby1.8.7/bin/bundle:19
   FAILED: http://devcenter.heroku.com/articles/bundler

! Heroku推被拒绝,无法通过Bundler安装宝石

有什么想法吗?提前谢谢!

1 个答案:

答案 0 :(得分:2)

在0.12.1中有一个使用Ruby 1.8的错误,0.12.2现在效果很好。