This is my personal website project.
-
ruby 1.9, recommend 1.9 p327 version
-
MySQL 5.x, you should set utf-8 default encoding utf-8 at
my.cnf, like this:[client] # on 5.0 or 5.1 default-character-set=utf8 [mysqld] default-character-set=utf8 [mysqld] # on 5.5 collation-server = utf8_unicode_ci init-connect='SET NAMES utf8' character-set-server = utf8 -
memcached
-
nginx as web server,
config/nginx.confis my nginx configuration snippet.
- run
bundle install - copy
config/app_config.example.ymltoconfig/app_config.ymland copyconfig/database.example.ymltoconfig/database.yml - modify database config for your need.
- create database match your database.yml and start your database.
- run
bundle exec rake secretto generate session secret key and fill it in app_config. - run
bundle exec rake ar:migrateto setup database schema. - run
bundle exec rake seedto generate admin user. - start memcached with
memcached -d. - run
bundle exec thin startfor development environment and run./servicectl startfor production environment.
remove such lines in Gemfile and run with thin.
gem 'kgio'
gem 'rainbows'