clone下来的代码配置运行

1.$ cd config $ cp log4r.yml.example log4r.yml $ cp settings.yml.example settings.yml $ cp database.yml.example database.yml

2.在项目根目录中mkdir log

3.vim database.yml,把password写进去,将socket那一行删掉。

4.$ bundle exec rake db:create

5.用script文件下的init文件来初始化数据库
eg: bundle exec ruby script/init_user.rb

6.$ bundle exec rake db:migrate

  1. cd config –> touch secrets.yml
    填入

development:
secret_key_base: 52eeb9ef4aebcf526c2415a6f3c0d579c7df7de12099a89a8ed834c840b348d999dec774a11a558d89f463b6bcf810d6e8c42849530e8f6f931ed0a5e66b57a4

test:
secret_key_base: 3d768887879e8a78b39213eb90dfd271ac405d369d1de16945d3747a444ab0566842115abfd8b37062136c2a1a77f196aa255a16e47354fc101bac31d65acb6c

Do not keep production secrets in the repository,

instead read values from the environment.

production:
secret_key_base: 680911118945d25bfffe2b69ecb5d332fe9f5494ccae9f06cdc2cc74434babf5f5389d64fe1d2aad4bf9f71534c47f5f5a257affaa49af9fdea1d63314ff1993

ps -ef | grep rails 查看rails进程
ps -ef | grep dev 查看前端进程