pg

    1熱度

    1回答

    我改變了我的PostgreSQL服務器的端口,因此它創建的套接字不再被命名爲「.s.PGSQL.5432」。 有沒有辦法更新/強制Rails/PGG來改變它看起來的套接字名稱?我曾嘗試卸載/重新安裝pg gem以符合建議,但它仍嘗試查找名爲.s.PGSQL.5432的套接字,而不是它應該按照database.yml註釋的.s.PGSQL.50000套接字, '套接字'配置行不適用於PostgreS

    7熱度

    3回答

    我想爲Ruby安裝pg(PostreSQL)gem。我收到此錯誤: postgres/9.2-pgdg/bin/64/pg_config Using config values from /location/to/install/postgres/9.2-pgdg/bin/64/pg_config checking for libpq-fe.h... yes checking for lib

    2熱度

    1回答

    我有一個項目工作在Ruby-1.9.3-p392上,我試圖用Jruby加載它(jruby-head使用rvm安裝,它是目前的JRuby 1.7.4.dev(1.9.3p392)) 所有rake任務失敗,下面的跟蹤 bundle exec rake -T rake aborted! load error: pg_ext -- java.lang.RuntimeException: C ext

    0熱度

    2回答

    Ruby和postgres問題:我想將Ruby腳本中的日期插入到postgres數據庫中。 數據庫日期格式爲:2013-03-13 17:08:51.207184-04 in postgres。順便說一下,Postgres數據庫的日期字段中的「51.207184-04」是什麼? 我想從ruby寫入postgres中日期列的數據。我假設我需要使用Time.now,但我不知道那是什麼?與日期時間結束時

    18熱度

    2回答

    數據庫noob警報: 我試圖插入到postgres表中。 我想插入的字段叫make_date。 字段類型是timestamp without time zone NOT NULL, 如何在當前日期中插入?就像現在的日期和時間一樣?類似下面的,但我無法得到正確的數據類型插入格式dateTime.now insert into inventory_tbl (make_date) values (dat

    1熱度

    1回答

    顯然pg寶石使用prepared statements作爲Postgres。我已經看到了修復獨角獸,以確保每道工序使用它自己的數據庫連接,像這樣: after_fork do |server, worker| ActiveRecord::Base.establish_connection end 但我不知道如何使Resque這項工作。

    3熱度

    1回答

    我正在嘗試使用heroku pg:transfer來將我的本地數據庫傳輸到Heroku。 這裏是我跑 heroku pg:transfer -f postgres://<username>:<password>@localhost:5432/<db_name> -t postgres://<app_path>.compute-1.amazonaws.com:5432/<stuff> --app <

    2熱度

    1回答

    checking for libpq-fe.h... *** extconf.rb failed *** 似乎是這個問題,從這個尾巴是: ERROR: Error installing pg: ERROR: Failed to build gem native extension. /Users/elephanttrip/.rvm/rubies/ruby-1.9.2-p

    6熱度

    1回答

    我正在Hartl的Rails教程中構建twitter clone應用程序。我克隆了我的git repo(https://github.com/stewartmccoy/rails_tutorial),並將代碼放到我的個人計算機上,該計算機以前在我的工作計算機上。所以,我的開發環境可能與我在Gemfile中指定的環境略有不同。 我的環境: 的Mac OS 10.6.8 的Rails 3.2.13 紅

    1熱度

    1回答

    我有一個ruby腳本,我需要從數據庫中檢索所有值,並對每個值進行檢索。目前我很難編碼每個檢索,但只有當有3個值回來時纔有效。我如何重複這個?下面是我的代碼: require 'pg' pg_conn = PGconn.connect(host = "main-pg-db-super.center.com", port = 6433, options = '', tty = '',