ruby-china本地部署流程

来源:互联网 发布:淘宝店铺归属地怎么改 编辑:程序博客网 时间:2024/05/20 05:08
  1. 安装需要的库文件
    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  

  2. 其他
    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

  3. 给代码打tag, 源码阅读必备
     ctags -R --exclude=*.js --exclude=.git --exclude=*.log  --exclude=*.py --exclude=*.sml --exclude=*.xml . ~/.rvm/gems/ruby-1.9.3-p194/gems/

  4. 增加 pry gem
      gem 'pry'  gem 'pry-rails'  gem 'pry-doc'  gem 'pry-nav'  gem 'pry-remote'  gem 'foreman'

  5. 新建Procfile文件,启动命令
    redis: redis-servermongodb: sudo service mongodb startsiderkiq: bundle exec sidekiq -c config/sidekiq.ymlsolr: bundle exec rake sunspot:solr:start  rails: rails s

    =========================
  6. 补充
    抛如下异常:
    !! 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




原创粉丝点击