elanbeat's wiki
OzimodoHowTo

ozimodo


インストール

事前準備

必須。

あった方がよい。

データベースの作成


$ 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
...

rake migrateの実行


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) ======================================

WEBrickで起動


ozimododir% ruby script/server

ブラウザで確認

http://localhost:3000/にアクセスしてページが表示されることを確認する。


設定


日本語化

基本的にUTF8であれば問題なく使える。


テーマ作成

Yahoo! UIを使ったテーマ作成手順のメモ

  1. theme/your_tumblelogをコピー
  2. Yahoo UIのbuild/grids/grids.css, build/fonts/fonts.css, build/reset/reset.cssをstylesheets/にコピー
  3. layout.rbの<= stylesheet_link_tag ’/stylesheets/theme/{...}’ >に3つのCSSファイルを追加

その他