Ruby

特定のテーブルで DataMapper を使ったら Ruby ごと死んだ

Sinatra + Passenger な環境で DataMapper を使っていたら、どうしても内容が取得できないテーブルが。 なんかエラーが出たりするならわかるんだけど、真っ白画面でなんのこっちゃ状態。 WEBrick を直接たたいて試してみたら、なんか segmentation fault で…

Rails を使用しない ActiveRecord + Migrate

メモ代わり。 ActiveRecord require 'rubygems' require 'active_record' ActiveRecord::Base.establish_connection( :adapter => 'postgresql', :host => 'localhost', :username => 'foo', :database => 'baz', :encoding => 'utf8' ) class User < Active…