2010-03-01から1ヶ月間の記事一覧

RailsでMongoDBを使ったモデリング

Ruby MongoDB Driver — Ruby Driver Manual 2.8 JOIN ができないので、キャッシュでうまいことやる? Caching to Avoid N+1When we display our list of stories, we'll need to show the name of the user who posted the story. If we were using a relati…

MongoDBの特徴

メリット スキーマレス KVS (これのメリットを挙げなきゃだよねw) デメリット トランザクションが使えない JOIN ができない

gem install rails でエラーが出たよ

[root@localhost ~]# gem install --test rails Successfully installed rake-0.8.7 Successfully installed activesupport-2.3.5 Successfully installed activerecord-2.3.5 Successfully installed rack-1.0.1 Successfully installed actionpack-2.3.5 S…

gem install mongo_ext はruby-1.8.5 じゃダメでruby-1.8.7でおkだった

詳細は不明。。 以下、ruby-1.8.5 の環境で実行したときのエラーメッセージ。 [root@iwatest01 ~]# gem install mongo_ext Building native extensions. This could take a while... ERROR: Error installing mongo_ext: ERROR: Failed to build gem native …

RubyのMongoDBドライバー、チュートリアル

File: README — mongo-2.8.0 driver でも本家と同じく、DB をあらかじめ作っておかなくても大丈夫。 The database doesn't have to exist - if it doesn't, MongoDB will create it for you. DBの認証は、mongd を起動するときに指定するらしい。あとで調べ…

MongoDBチュートリアル

Getting Started — MongoDB Manual へぇ、create database とかやらないんだ。 Tip for Developers with Experience in Other Databases You may notice, in the examples below,that we never create a database or collection. MongoDB does not require t…

RailsでMongoDBを使う設定

Rails は使える、という前提で。 configuration BSON 4.0.0 Tutorial — Ruby Driver Manual 2.8gem の設定を一般ユーザでやると怒られる。 sudo でもダメ。root でやったら問題なかった。 うーん、謎。ここらへんもまだ勉強が必要。 一般ユーザ $ rake gems:…

MongoDB のquckstart

Install MongoDB — MongoDB Manual Linux 32-bit # make default directory for data $ mkdir -p /data/db # using curl, get the pre-built distro $ curl -O http://downloads.mongodb.org/linux/mongodb-linux-i686-latest.tgz # unpack $ tar xzf mongod…

VMware の時刻のズレをなんとかしたい

VMware で Linux を動かした際の時刻のずれを解消する(続き) - WebOS Goodiesここ(のコメント欄) を参考に、 # cd /etc # vi .vmx tools.syncTime = "TRUE" で、ログインし直してみたけど。。 すぐには反映されないのか? ちょっと様子見。

Vmware-Tools のインストール

参考にさせていただいた記事。(というかそのまま。。)ありがとうございます。http://marchen.boy.jp/2009/05/centos-53%E3%81%ABvmware-tools%E3%82%92%E5%B0%8E%E5%85%A5/ # yum -y install gcc # yum -y install kernel-devel.i686 ゲストOSのメニューから…