#ruby-postgers

~$ sudo gem install ruby-postgres

Attempting local installation of 'ruby-postgres'
Local gem file not found: ruby-postgres*.gem
Attempting remote installation of 'ruby-postgres'
Updating Gem source index for: http://gems.rubyforge.org
Select which gem to install for your platform (i386-linux)
1. ruby-postgres 0.7.1.2005.12.21 (mswin32)
2. ruby-postgres 0.7.1.2005.12.21 (ruby)
3. ruby-postgres 0.7.1.2005.12.20 (mswin32)
4. ruby-postgres 0.7.1.2005.12.20 (ruby)
5. ruby-postgres 0.7.1.2005.11.27 (ruby)
6. ruby-postgres 0.7.1.2005.11.27 (mswin32)
7. ruby-postgres 0.7.1.2005.11.24 (mswin32)
8. Cancel installation
> 2
Building native extensions. This could take a while...
extconf.rb:6:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:6
ERROR: While executing gem ... (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/ruby-postgres-0.7.1.2005.12.21 for inspection.
ruby extconf.rb install ruby-postgres\n

Results logged to /usr/lib/ruby/gems/1.8/gems/ruby-postgres-0.7.1.2005.12.21/gem_make.out

/usr/lib/ruby/gems/1.8/gems/ruby-postgres-0.7.1.2005.12.21$ ls

ChangeLog MANIFEST README.ja extconf.rb libpq-compat.c ruby-postgres.gemspec tests
Contributors README doc gem_make.out postgres.c sample type-oids.h

/usr/lib/ruby/gems/1.8/gems/ruby-postgres-0.7.1.2005.12.21$ ruby extconf.rb

extconf.rb:6:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:6

~$ sudo dpkg --list postgresql

要望=(U)不明/(I)インストール/(R)削除/(P)完全削除/(H)維持

状態=(N)無/(I)インストール済/(C)設定/(U)展開/(F)設定失敗/(H)半インストール
/ エラー=(空欄)無/(H)維持/(R)要再インストール/X=両方(状態,エラーの大文字=異常)
/ 名前 バージョン 説明
        • ========================-========================-================================================================

ii postgresql 7.4.7-6sarge1 object-relational SQL database management system


~$ sudo apt-get install ruby-dev

パッケージリストを読みこんでいます... 完了
依存関係ツリーを作成しています... 完了
パッケージ ruby-dev はデータベースには存在しますが、利用できません。
おそらく、そのパッケージが見つからないか、もう古くなっているか、
あるいは別のソースからのみしか利用できないという状況が考えられます
しかし、以下のパッケージで置き換えられています:
ruby1.6-dev
E: パッケージ ruby-dev にはインストール候補がありません

~$ sudo apt-get install ruby1.6-dev

パッケージリストを読みこんでいます... 完了
依存関係ツリーを作成しています... 完了
以下の特別パッケージがインストールされます:
libruby1.6
推奨パッケージ:
ruby1.6
以下のパッケージが新たにインストールされます:
libruby1.6 ruby1.6-dev
アップグレード: 0 個、新規インストール: 2 個、削除: 0 個、保留: 0 個。
1168kB のアーカイブを取得する必要があります。
展開後に追加で 3129kB のディスク容量が消費されます。
続行しますか? [Y/n] y
取得:1 http://ftp.jp.debian.org stable/main libruby1.6 1.6.8-12sarge1 [616kB]
取得:2 http://ftp.jp.debian.org stable/main ruby1.6-dev 1.6.8-12sarge1 [552kB]
1168kB を 1s で取得しました (640kB/s)
未選択パッケージ libruby1.6 を選択しています。
(データベースを読み込んでいます... 現在 25840 個のファイルとディレクトリがインストールされています。)
(.../libruby1.6_1.6.8-12sarge1_i386.deb から) libruby1.6 を展開しています...
未選択パッケージ ruby1.6-dev を選択しています。
(.../ruby1.6-dev_1.6.8-12sarge1_i386.deb から) ruby1.6-dev を展開しています...
libruby1.6 (1.6.8-12sarge1) を設定しています ...

ruby1.6-dev (1.6.8-12sarge1) を設定しています ...


/usr/lib/ruby/gems/1.8/gems/ruby-postgres-0.7.1.2005.12.21$ ruby extconf.rb

extconf.rb:6:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:6

(ノ∀`)アチャー

/usr/lib/ruby/1.8$ ls

English.rb date2.rb forwardable.rb kconv.rb optparse.rb readbytes.rb shellwords.rb un.rb
Env.rb debug.rb ftools.rb logger.rb ostruct.rb resolv-replace.rb singleton.rb uri
abbrev.rb delegate.rb generator.rb mailread.rb parsearg.rb resolv.rb soap uri.rb
base64.rb dl getoptlong.rb mathn.rb parsedate.rb rexml sync.rb weakref.rb
benchmark.rb drb getopts.rb matrix.rb pathname.rb rinda tempfile.rb webrick
bigdecimal drb.rb gserver.rb md5.rb ping.rb rss test webrick.rb
cgi e2mmap.rb i386-linux monitor.rb pp.rb rubyunit.rb thread.rb wsdl
cgi-lib.rb erb.rb importenv.rb mutex_m.rb prettyprint.rb runit thwait.rb xmlrpc
cgi.rb eregex.rb io net profile.rb scanf.rb time.rb xsd
complex.rb expect.rb ipaddr.rb observer.rb profiler.rb set.rb timeout.rb yaml
csv.rb fileutils.rb irb open-uri.rb pstore.rb sha1.rb tmpdir.rb yaml.rb
date finalize.rb irb.rb open3.rb racc shell tracer.rb
date.rb find.rb jcode.rb optparse rational.rb shell.rb tsort.rb

mkmf.rbがない。
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-list/17605?help

$ sudo gem install postgres-pr

Attempting local installation of 'postgres-pr'
Local gem file not found: postgres-pr*.gem
Attempting remote installation of 'postgres-pr'
Successfully installed postgres-pr-0.4.0

全然解決してないけどとりあえずこれでよし。