DevSetUp

Installation

Run initial database migrations

cd hyperactive
cp config/database.yml.sample config/database.yml # <-- enter your password into the database.yml file if your db server requires one!
mkdir public/system components index log
rake db:create:all
rake db:migrate
rake xapian:rebuild_index models="Content Collective" 
rake db:test:clone
RAILS_ENV=test rake xapian:rebuild_index models="Content Collective" 

If your MySql server has a username and password set, don't forget to enter the proper information into the config/database.yml file. (Note that git doesn't save empty directories so that is why we have to make lots of directories above).

Run the site!

You can now run the site. To do so, fire up a terminal in the root hyperactive directory and run the following command:

script/server

This should start a built-in http server. The site will now be accessible at http://localhost:3000

You can also run the backgroundrb server, which takes care of things like encoding video uploads and grabbing RSS feeds from out on the internet. To do so, run:

rake backgroundrb:start

You will also want to login as admin for some stuff by going to http://localhost:3000/admin with user: admin and password: password. If the site is going to be on the internet you will probably want to change the password ...

Bonus rake tasks

It sucks to get a brand new site and then have to poke away entering lots of crappy "lorem ipsum" articles to fill up the site and start to understand its features. To get a populated site, run:

rake hyperactive:seed

This will publish ~15 articles, ~15 events, ~5 groups, 1 video, and start the daemon process which will retrieve an rss feed from global indy, then encode the video. If you publish a bunch of stuff during testing that you wouldn't want to show your mother, you can also run:

rake hyperactive:burn_it_down

This will destroy/recreate all databases and re-seed the database with some fake content.

Notes for developers

As usual with rails, to run the unit tests just run:

rake

and check that it all seems to work. But before the first test run, you have to build the xapian index for the test database:

RAILS_ENV=test rake xapian:rebuild_index models="Content Collective"

mods

You can override parts of the site to customise it by using mods. First you need to enable them by

cp config/mods_enabled.list.sample config/mods_enabled.list

and inside the new mods_enabled.list file delete "london" and type in the name of your mod directory. Create that directory inside mods. Also have a read of the comments in config/mods_enabled.list.sample and the mods/README file.

tests

There are two seperate suites of cucumber tests, one with and one without Selenium, which is slower to run. To run the tests, run the following commands from the command line in your hyperactive working copy:

  rake cucumber:ok           # Runs 'normal' cucumber tests in the features/normal
  rake cucumber:wip          # Runs tests annotated @wip in features/normal
  rake cucumber:selenium     # Runs selenium tests in features/selenium
  rake cucumber:selenium_wip # Runs selenium tests annotated @wip in features/selenium

Sqlite3 Notes
ProductionInstallationOnDebian

Also available in: HTML TXT