diff --git a/Gemfile b/Gemfile index 46db05a..29c7133 100644 --- a/Gemfile +++ b/Gemfile @@ -38,7 +38,7 @@ gem 'jbuilder', '~> 2.0' gem 'sdoc', '~> 0.4.0', group: :doc # for postgresql -gem 'pg', '~> 0.18.4' +gem 'pg', '~> 0.18.2' gem 'carrierwave' gem 'mini_magick' diff --git a/Gemfile.lock b/Gemfile.lock index 72b5dfa..0a82286 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -205,7 +205,7 @@ DEPENDENCIES jbuilder (~> 2.0) jquery-rails mini_magick - pg (~> 0.18.4) + pg (~> 0.18.2) rails (= 4.2.5.2) rails_12factor rails_admin (~> 0.8.1) diff --git a/README.md b/README.md index 0179cb8..e10a7cf 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,37 @@ ###(本项目名称为找教室) -##([本组的heroku展示地址](https://courseselectofstormand.herokuapp.com/)) ##(本组人员:李汉正、张易凡、肖麟慧、邓贺元) -### 目前功能: +### 功能介绍: * 学生登陆 +* 浏览讲座信息 * 查询空闲教室 * 查询课程信息 -## 说明 - -目前使用的库和数据库: - -* 使用[Bootstrap](http://getbootstrap.com/)作为前端库 -* 使用[Rails_admin Gem](https://github.com/sferik/rails_admin)作为后台管理 -* 使用[Postgresql](http://postgresapp.com/)作为数据库 - -使用前需要安装Bundler,Gem,Ruby,Rails等依赖环境。 -## 安装 -在终端(MacOS或Linux)中执行以下代码 -``` -$ git clone https://github.com/PENGZhaoqing/CourseSelect -$ cd CourseSelect -$ bundle install + + + + + + + + + + + + + + $ rake db:migrate $ rake db:seed $ rails s @@ -47,12 +46,6 @@ $ rails s 密码:`password` -2.老师登陆: - -账号:`teacher1@test.com` - -密码:`password` - 3.管理员登陆: @@ -63,30 +56,4 @@ $ rails s 账号中数字都可以替换成2,3...等等 -## Heroku云部署 - -项目可直接在Heroku上免费部署 - -1.fork此项目到自己Github账号下 - -2.创建Heroku账号以及Heroku app - -3.将Heroku app与自己Github下的fork的项目进行连接 - -4.下载配置[Heroku CLI](https://devcenter.heroku.com/articles/heroku-command-line)命令行工具 - -5.运行`heroku login`在终端登陆,检查与heroku app的远程连接情况`git config --list | grep heroku`,若未检查到相应的app,请看[这里](http://stackoverflow.com/questions/5129598/how-to-link-a-folder-with-an-existing-heroku-app) - -6.运行部署,详情[请戳这里](https://devcenter.heroku.com/articles/getting-started-with-rails4#rails-asset-pipeline) - - - -## How to Contribute - -先fork此项目,在分支修改后,pull request到主分支 - -提问请到issues里创建,欢迎contributor! - -如果觉得好,给项目点颗星吧~ - diff --git a/config/database.yml b/config/database.yml index 0387c69..bda9326 100644 --- a/config/database.yml +++ b/config/database.yml @@ -2,18 +2,19 @@ default: &default adapter: postgresql encoding: unicode pool: 5 + username: <%= ENV['USERNAME'] %> + password: <%= ENV['PASSWORD'] %> + host: <%= ENV['IP'] %> development: <<: *default - database: courseselect_development + database: sample_app_development -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. test: <<: *default - database: courseselect_test + database: sample_app_test production: <<: *default - database: courseselect_developement + database: sample_app_production +