-
Notifications
You must be signed in to change notification settings - Fork 19
/
HACKING.txt
112 lines (66 loc) · 2.9 KB
/
HACKING.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Basic get-you-up-and-running instructions.
REQUIREMENTS
* Ruby 1.8.7 or 1.9.2 (caveat emptor: delayed_job won't work with 1.9.2)
* RubyGems ~> 1.3.7
* bundler gem ~> 1.0.0.rc.6 (install with gem install bundler --pre)
* MySQL, including client libraries (e.g. libmysqlclient-dev on Debian)
Additionally, on Debian:
* ruby1.8-dev (to get mkmf.rb, which is not in the ruby1.8 package)
* libopenssl-ruby1.8
* libxml2
* libxslt
DEBIAN INSTRUCTIONS
First obtain a set of required packages from apt:
apt-get install build-essential git-core ruby1.8 ruby1.8-dev rubygems1.8 mysql-server-5.0 libmysqlclient15-dev libxml2 libxml2-dev libxslt1-dev libxslt1.1 libopenssl-ruby1.8
The version of RubyGems in apt is unfortunately out of date. This can be remedied with:
gem install rubygems-update
cd /var/lib/gems/1.8/bin
./update_rubygems
Now, install required gems:
gem install bundler --pre
SETUP
1. Grab the source:
$ git clone git://github.com/oneclickorgs/one-click-orgs.git
$ cd one-click-orgs
2. Install the required gems using Bundler:
$ bundle install # installs gem system-wide
or
$ bundle install --path vendor/bundle # vendors everything, no system gems
3. Create your local config files:
$ rake oco:generate_config
4. Set up your database connection settings, by editing config/database.yml as desired.
If your database user doesn't have CREATE DATABASE permissions, create the databases manually, e.g.:
$ mysql -u root -p
mysql> create database one_click_development;
mysql> create database one_click_test;
mysql> exit;
5. (Create and) migrate the database:
$ rake db:setup
RUNNING
1. Start the web server:
$ bundle exec rails server
2. (Optional) In another shell, start the job server (which sends emails and closes proposals):
$ script/delayed_job run # run in foreground
$ script/delayed_job start # start as daemon (check log/delayed_job.log)
$ rake jobs:work # forground, from rake
$ rake jobs:clear # clear queue
3. Visit http://localhost:3000/
UPDATING
When you pull updates from the repository, you may need to update your gem bundle (if Gemfile.lock has changed) and/or migrate your database (if db/migrate has changed):
$ bundle install
$ rake db:migrate
These commands will safely no-op if no changes are necessary.
CONTRIBUTING
Before you submit any patches make sure that no tests fail:
$ rake spec
To submit a patch, you have several options:
a. Put your changes in a branch with an appropriate name, and push it to your GitHub repository, and send a pull request to chrismear.
b. Open or reply to an issue in the issue tracker, and tell us where to find your commits:
http://github.com/emmapersky/one-click-orgs/issues
c. Send a patch to the mailing list:
http://groups.google.co.uk/group/oneclickorgs-devspace
CONTACT
There is a mailing list:
http://groups.google.co.uk/group/oneclickorgs-devspace
and an IRC channel:
#oneclickorgs on irc.freenode.net