- Ruby 1.9.3
- RubyGems ~> 1.3.7
- bundler gem ~> 1.0.0 (install with gem install bundler)
- MySQL, including client libraries (e.g. libmysqlclient-dev on Debian)
- wkhtmltopdf N.B. One Click Orgs is not compatible with the wkhtmltopdf in Debian/Ubuntu's packages.
-
Grab the source:
$ git clone git://github.com/oneclickorgs/one-click-orgs.git $ cd one-click-orgs
-
Install the required gems using Bundler:
$ bundle install # installs gem system-wide
or
$ bundle install --path vendor/bundle # vendors everything, no system gems
-
Create your local config files:
$ bundle exec rake oco:generate_config
-
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;
-
(Create and) migrate the database:
$ bundle exec rake db:setup
-
Start the web server:
$ bundle exec rails server
-
(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) $ bundle exec rake jobs:work # foreground, from rake $ bundle exec rake jobs:clear # clear queue
-
Visit
http://localhost:3000/
.
You can just choose 'single organisation mode', or if you want to test multi-tenancy mode, you'll need lines in your hosts file which point yourorganisation.localhost
, etc. to 127.0.0.1
.
Unless you're working on the founding stage itself, it can be handy to create an active organisation to experiment with, without having to walk through all the founding steps manually.
To do this, run the oco:dev:create_organisation
rake task:
$ bundle exec rake oco:dev:create_organisation
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
$ bundle exec rake db:migrate
These commands will safely no-op if no changes are necessary.
Before you submit any patches make sure that no tests fail:
$ bundle exec rake spec
$ bundle exec rake cucumber
To submit a patch, you have several options:
-
Put your changes in a branch with an appropriate name, and push it to your GitHub repository, and send a pull request to
oneclickorgs
. -
Open or reply to an issue in the issue tracker, and tell us where to find your commits.
-
Send a patch to the mailing list.
There is a mailing list and an IRC channel, #oneclickorgs on irc.freenode.net.