You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/LocalReadMe.md

28 lines
2.1 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

## 数据库
1.创建一个新的数据库如edu_local必须是UTF-8
命令CREATE DATABASE `edu_local` CHARACTER SET utf8 COLLATE utf8_general_ci;
2.设置本地database.yml
3. 链接mysql执行导入数据库source /Users/jingquanhuang/eduplus2/db/structure.sql
3.1 mac电脑 pwd 获取本地目录
4. 导入基础数据: source /Users/jingquanhuang/eduplus2/db/init.sql
4. 初始化种子数据 bundle exec rake db:seed
5、启动服务用 bundle exec rails s
5.1、 出现db:migrate 错误 执行bundle exec rake db:migrate
5.2、*** 前端改动了app/assets/里面样式或者js的话提交代码的时候要先删除 public/assets/ 下的文件
然后执行 rake assets:precompile
6、设置配置文件数据/edu_settins: 配置: origin_database原始数据库及有数据的数据库database需要导入的数据库及database.yml中的数据库
7、调用接口
url: /api/initialization_data.json?paths=123,124,125
参数paths: 需要导入的实训路径的id以逗号分隔
8、 超级管理员用户
educoder 123456789
9、 需要导入的TPM版本库
在mysql中select repo_name from shixuns;
将mysql输出的结果交给运维使用脚本一建导入
10、 关于实训的附件问题:
select * from attachments where container_type='Shixun' and container_id in(select distinct(c.id) from subjects s join stage_shixuns ss on ss.subject_id = s.id join shixun_mirror_repositories smr on smr.shixun_id = ss.shixun_id join mirror_repositories mr on mr.id = smr.mirror_repository_id join challenges c on c.shixun_id = ss.shixun_id where s.id in(406, 51, 388, 408, 413, 411, 412, 410, 405, 407, 414));
11、 本地版要build 首先复制一份 build fonts 下的文件放入build 中
然后在把//i.alicdn.com/artascope-font/20160419204543/font
cdn 地址改为../../fonts
12、 前端阿里云合并要注意事项 1 导师排行版 程序员排行版要去掉 在shixunsHome.js 上