Description:
run rake db:seed after migration
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r87:8e9b4b13e4ad - - 1 file changed: 1 inserted, 0 deleted

@@ -34,90 +34,91
34 34 echo "Don't forget to grant access to that database fro the user."
35 35 echo "Please have username, password, and database name ready before continue."
36 36 echo "Hit enter when ready..."
37 37 read dummy
38 38 fi
39 39
40 40 CAFE_PATH=`pwd`
41 41
42 42 cd web
43 43
44 44 echo "Please provide grader database:"
45 45 read database
46 46
47 47 echo "Please provide grader username:"
48 48 read username
49 49
50 50 echo "Please provide $username password:"
51 51 read password
52 52
53 53 echo "development:" > config/database.yml
54 54 echo " adapter: mysql" >> config/database.yml
55 55 echo " database: $database" >> config/database.yml
56 56 echo " username: $username" >> config/database.yml
57 57 echo " password: $password" >> config/database.yml
58 58 echo " host: localhost" >> config/database.yml
59 59 echo "" >> config/database.yml
60 60 echo "production:" >> config/database.yml
61 61 echo " adapter: mysql" >> config/database.yml
62 62 echo " database: $database" >> config/database.yml
63 63 echo " username: $username" >> config/database.yml
64 64 echo " password: $password" >> config/database.yml
65 65 echo " host: localhost" >> config/database.yml
66 66
67 67 echo "Object.instance_eval{remove_const :GRADER_ROOT_DIR}" >> config/environment.rb
68 68 echo "Object.instance_eval{remove_const :GRADING_RESULT_DIR}" >> config/environment.rb
69 69 echo "GRADER_ROOT_DIR = '$CAFE_PATH/judge'" >> config/environment.rb
70 70 echo "GRADING_RESULT_DIR = '$CAFE_PATH/judge/result'" >> config/environment.rb
71 71
72 72 echo "Installing required gems"
73 73
74 74 sudo rake gems:install
75 75 # to remove log file owned by root
76 76 sudo rm log/*
77 77 sudo rmdir log
78 78
79 79 echo "Running rake tasks to initialize database"
80 80
81 81 rake db:migrate
82 + rake db:seed
82 83
83 84 echo "Intalling web interface complete..."
84 85 echo
85 86 echo "Fetching grader"
86 87
87 88 cd ..
88 89
89 90 mkdir judge
90 91 cd judge
91 92 git clone http://git.gitorious.org/cafe-grader/cafe-grader-judge-scripts.git scripts
92 93 mkdir raw
93 94 mkdir ev-exam
94 95 mkdir ev
95 96 mkdir result
96 97 mkdir log
97 98
98 99 echo "Configuring grader"
99 100
100 101 cp scripts/config/env_exam.rb.SAMPLE scripts/config/env_exam.rb
101 102 cp scripts/config/env_grading.rb.SAMPLE scripts/config/env_grading.rb
102 103
103 104 # create new environment.rb file
104 105 echo "RAILS_ROOT = '$CAFE_PATH/web'" > scripts/config/environment.rb
105 106 echo "GRADER_ROOT = '$CAFE_PATH/judge/scripts'" >> scripts/config/environment.rb
106 107 echo "require File.join(File.dirname(__FILE__),'../lib/boot')" >> scripts/config/environment.rb
107 108 echo "require File.dirname(__FILE__) + \"/env_#{GRADER_ENV}.rb\"" >> scripts/config/environment.rb
108 109
109 110 cd ..
110 111
111 112 echo "Installing web server mongrel"
112 113
113 114 sudo gem install mongrel --no-ri --no-rdoc
114 115
115 116 echo "Now you are ready to run cafe grader...."
116 117 echo
117 118 echo "Try:"
118 119 echo " cd web"
119 120 echo " ./script/server"
120 121 echo
121 122 echo "and access web at http://localhost:3000/"
122 123
123 124
You need to be logged in to leave comments. Login now