This README would normally document whatever steps are necessary to get the application up and running.
-
Ruby version 2.1.2
-
Database PostgreSQL 9.4
-
Api doc gen gem ‘api_doc_generation’, git: ‘git@github.com:season/rails_api_doc_generation.git’, branch: ‘master’
把api下sessions和registions类的继承关系换一下,运行rake doc:api会将生成文档输出路径
-
Sunspot 全文检索工具(用于搜索 post 相关内容)
1.先安装 Java 环境
2.安装生成默认的配置信息
rails generate sunspot_rails:install
3.运行Sunspot
rake sunspot:solr:start #后台运行 rake sunspot:solr:run #在前台运行
4.重建索引
cap staging solr:stop_all # 本地直接删除 solr 目录即可 cap staging solr:start cap staging solr:reindex
-
init database and gen base infos
rake database:init rake util:init rake database:base_infos
-
deploy fail
Rake::Task.clear_actions task :compile_assets => [:set_rails_env] do
run_locally do if capture("git --no-pager diff #{fetch(:previous_revision)} #{fetch(:current_revision)} app/assets vendor/assets").empty? info "Skipping assets compilation" else invoke 'deploy:assets:precompile' invoke 'deploy:assets:backup_manifest' end end
end