Environment Development

Set up Ruby development environment

1. install homebrew

follow official guide to install homebrew, then update repository with this command brew update

2. install dependent software and service, use below command to install.

  * 
  * brew install redis
  * brew install memcached
  * brew install rabbitmq
  * brew install mysql

there is an issue for homebrew mysql 5.5, check if it is fixed, https://github.com/mxcl/homebrew/issues/4932

  * brew install sphinx
  * brew install imagemagick

if you want to run these software or service when login, just follow brew's instruction after you installed a service. These instructions also tell you how to start these services manually.

3. install MySQL gemmake sure your mysql is running. if not, run it manually with mysql.server start change root account password with mysqladmin -u root password "" then run bellow command to install mysql gem for Max OS X 10.6:

 1. chmod g+w /usr/local
 2. sudo chmod -R 777 /usr/local/var/mysql
 3. sudo gem update --system
 4. sudo gem install bundler rake
 5. gem install mysql -- --with-mysql-dir=/usr/local --with-mysql-config=/usr/local/bin/mysql_config

4. project initializationclone code with git: git clone [email protected]:aurorafeint/OFServer install dependent bundles: bundle install create database configuration: cp config/database.yml.example config/database.yml, then edit it for your situation.

database initialization:

 1. rake db:create
 2. rake db:bootstrap
 3. rake db:seed
 4. rake ts:index
 5. rake ts:start

OK, now you have finished the environment setup, enjoy it.

Labels:

最終更新:2012年02月17日 09:37