pg

Error installing pg gem on osx

只谈情不闲聊 提交于 2019-11-30 11:35:58
问题 I am on osx 10.6.7 trying to run bundle install on a new rails 3.0.7 app and it keeps failing when trying to build the pg gem. It keeps telling me that I have need the developer tools. But as far as I can tell I have the developer tools installed. Here is the output of xcodebuild -version Xcode 3.2.6 Component versions: DevToolsCore-1809.0; DevToolsSupport-1806.0 BuildVersion: 10M2518 Here is the output of the failed pg gem build /Users/bm/.rvm/rubies/ruby-1.9.2-head/bin/ruby extconf.rb -

用Eclipse追PostgreSQL源码

戏子无情 提交于 2019-11-30 09:43:34
本篇主要讲述了怎么用Eclipse追PostgreSQL源码的过程。使用的Eclipse版本是Juno Service Release 2,PG的版本是postgresql 9.2.2。 首先第一步就是要安装编译好的PostgreSQL(见 Eclipse编译PostgreSQL 9.2.2 )。在Eclipse上打开Make Target 视图(Window->Show View->Other->Make->Make Target)。右键本工程,选择New,创建一个名字,如下图所示: 双击install。等待一小会儿,在控制台窗口显示PostgreSQL installation complete就安装成功了。安装的默认路径是在 Eclipse编译PostgreSQL 9.2.2 中配置的HOME路径,这时会发现在该目录下出现了一个project的文件夹,里面就是安装好的PG数据库,如图所示: 第二步,是对数据库进行初始化。首先设置一下数据库将要存放的文件夹目录。代码如下: export PATH=$HOME/project/bin:$PATH export PGDATA=DemoDir initdb 执行initdb稍等片刻会显示如下提示: 第三步:调试PG。回到Eclipse中,右键自己的pg工程,选择Run as->Run Configurations->C/C++

Set default value for Postgres JSON column in Rails < 4

旧时模样 提交于 2019-11-30 08:31:24
So I'm starting to use the Postgres JSON datatype, now that there's a lot of fun stuff you can do with it . In one of my Rails apps which is not yet Rails 4 (where support for Postgres JSON has been added ) I added a JSON column like this: create_table :foo do |t| t.column :bar, :json end but I can't figure out how to set a default value for the column. I tried all variations like {} , '{}' , '{}'::json , '[]'::json etc. but I either get an error when the migration runs or it simply doesn't work, meaning the migration runs but, when I create a new Foo , bar is nil . janfoeh Although a bit late

gem install pg can not bind to libpq

自闭症网瘾萝莉.ら 提交于 2019-11-30 06:25:00
问题 After upgrading to Ruby 1.9.3 (from 1.9.2 using system RVM) on Ubuntu 10.04.3, I removed all of my gems, and attempted to reinstall pg (ala bundle install pg ). It then threw an error and informed me that I should look at mkmf.log, both of which are included in this gist: https://gist.github.com/d05a81701d968895c730 libpq-dev, libpq5, and postgresql-client are all installed and working correctly. Pointing gem at pg_config, and the include and bin directories directly does not appear to change

Error installing pg gem on osx

一笑奈何 提交于 2019-11-30 00:35:07
I am on osx 10.6.7 trying to run bundle install on a new rails 3.0.7 app and it keeps failing when trying to build the pg gem. It keeps telling me that I have need the developer tools. But as far as I can tell I have the developer tools installed. Here is the output of xcodebuild -version Xcode 3.2.6 Component versions: DevToolsCore-1809.0; DevToolsSupport-1806.0 BuildVersion: 10M2518 Here is the output of the failed pg gem build /Users/bm/.rvm/rubies/ruby-1.9.2-head/bin/ruby extconf.rb --with-pg-config=/Library/PostgreSQL/8.4/bin/pg_config Using config values from /Library/PostgreSQL/8.4/bin

rails install pg - Can't find the 'libpq-fe.h header

孤街浪徒 提交于 2019-11-29 22:46:33
$ sudo bundle install Result Fetching gem metadata from https://rubygems.org/........... Fetching gem metadata from https://rubygems.org/.. Using rake (0.9.2.2) Using i18n (0.6.1) Using multi_json (1.3.6) Using activesupport (3.2.8) Using builder (3.0.4) Using activemodel (3.2.8) Using erubis (2.7.0) Using journey (1.0.4) Using rack (1.4.1) Using rack-cache (1.2) Using rack-test (0.6.2) Using hike (1.2.1) Using tilt (1.3.3) Using sprockets (2.1.3) Using actionpack (3.2.8) Using mime-types (1.19) Using polyglot (0.3.3) Using treetop (1.4.11) Using mail (2.4.4) Using actionmailer (3.2.8) Using

PG pg_ext load error in rails

浪尽此生 提交于 2019-11-29 18:45:43
问题 I recently updated to rails 4.1.6 and ruby 2.1.3p242. I also updated all gems on my system. After creating a new app, I keep getting a pg_ext load file error on running the server. I'm on windows 8 x64 with PostgreSQL 9.3. The pg gem was working fine under my previous RoR installation which was rails 3.2 and ruby 1.9.3. Under the gem's installation directory, I've a 2.0/pg_ext.so file. I tried renaming the folder to 2.1 and ran the server. The result was the same. I assume it's cause Ruby

rails 4.2.0: can't install pg gem on ubuntu 14.04

最后都变了- 提交于 2019-11-29 17:18:33
问题 I have recently tried to upgrade my rail 3.2* application to rails 4.2.*. But, I was stopped while installing the 'pg' gem. When I googled it, the solutions which are mostly related to OSX only. But I'm using ubuntu 14.04. Need any suggestion for the below issue. I have installed postgresql 9.3.5 version on my machine. Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /usr/local/rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb checking for pg_config... yes Using config values from

Postgres - the last version 0.14.0 of the “pg” gem gives error

岁酱吖の 提交于 2019-11-29 13:54:09
I have updated my bundler which contains pg gem and I got the error An error occured while installing pg (0.14.0), and Bundler cannot continue. Make sure that `gem install pg -v '0.14.0'` succeeds before bundling. I have checked this gem on rubygems.org and today (June 23) was released this version. I don't know why, but the version doesn't works me correctly and return the error above. The solution is set up the specific version - in this case gem "pg", "~> 0.13.2" Anyone with the same issue? You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for

Installing pg -v 0.17.1

一笑奈何 提交于 2019-11-29 08:07:48
I'm using/I want to use Postgresql as database, but when I type "bundle install" or "bundle update", I get this error, what do I do to fix this? :) Installing pg (0.17.1) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb checking for pg_config... no No pg_config... trying anyway. If building fails, please try again with --with-pg-config=/path/to/pg_config checking for libpq-fe.h... no Can't find the 'libpq-fe.h header *** extconf.rb failed *** Could not create Makefile due to some