- 安装需要的库文件
Install and start Redis, MongoDB, memcached, Python,Pygments
redis http://blog.csdn.net/hexudong08/article/details/7561904
mongodb http://blog.csdn.net/hexudong08/article/details/7696397
memcached apt-get install memcached
pygments http://blog.csdn.net/hexudong08/article/details/7709083
- 其他
cp config/config.yml.default config/config.ymlcp config/mongoid.yml.default config/mongoid.ymlcp config/redis.yml.default config/redis.ymlcp config/thin.yml.default config/thin.ymlbundle installbundle exec rake db:migratebundle exec rake db:seedbundle exec sidekiq -C config/sidekiq.ymlbundle exec rake sunspot:solr:startrails s
- 给代码打tag, 源码阅读必备
ctags -R --exclude=*.js --exclude=.git --exclude=*.log --exclude=*.py --exclude=*.sml --exclude=*.xml . ~/.rvm/gems/ruby-1.9.3-p194/gems/
- 增加 pry gem
gem 'pry' gem 'pry-rails' gem 'pry-doc' gem 'pry-nav' gem 'pry-remote' gem 'foreman'
- 新建Procfile文件,启动命令
redis: redis-servermongodb: sudo service mongodb startsiderkiq: bundle exec sidekiq -c config/sidekiq.ymlsolr: bundle exec rake sunspot:solr:start rails: rails s
========================= - 补充
抛如下异常:
!! Rack application returned nil body. Probably you wanted it to be an empty string?!! Unexpected error while processing request: undefined method `each' for nil:NilClass
是因为没有启动 memcached
需要启动memcached, start cmd: memcached
sidekiq 的启动需要 大写-C