必須。
あった方がよい。
$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 to server version: 4.1.16 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> CREATE DATABASE ozimodo; Query OK, 1 row affected (0.42 sec) mysql> GRANT ALL PRIVILEGES ON ozimodo.* TO username@localhost IDENTIFIED BY 'password-goes-here' WITH GRANT OPTION; Query OK, 0 rows affected (0.37 sec)
config/database.ymlを自分の環境に合わせて編集する。
ozimododir% vi config/database.yml ozimododir% cat config/database.yml ... development: adapter: mysql database: ozimodo username: username password: password-goes-here host: hostname-goes-here ...
ozimododir% rake migrate (in /somewhere/ozimododir) GetYourTumbleOn: migrating ===============================================
—create_table(:posts) → 0.9333s
—add_index(:posts, :id, :unique) → 0.3300s
—create_table(:posts_tags, {:id=>false}) → 0.0630s
—add_index(:posts_tags, [:post_id, :tag_id]) → 0.1123s
—create_table(:tags) → 0.0197s
—add_index(:tags, :id, :unique) → 0.0598s
—create_table(:users) → 0.0419s
—add_index(:users, :id, :unique) → 0.0616s
GetYourTumbleOn: migrated (1.6993s) ====================================== StupidIndicexes: migrating ===============================================
—remove_index(:posts, :id) → 0.0402s
—remove_index(:tags, :id) → 0.0443s
—remove_index(:users, :id) → 0.0283s
StupidIndicexes: migrated (0.1136s) ======================================
ozimododir% ruby script/server
http://localhost:3000/にアクセスしてページが表示されることを確認する。
基本的にUTF8であれば問題なく使える。
Yahoo! UIを使ったテーマ作成手順のメモ