Get Hyper Active!¶
In order to get the site running on your local machine, you'll need to download a bunch of stuff. First, you need to have all the right supporting software installed. Then you need to download the Hyperactive code, configure the site to run on your machine, and run it.
The installation docs are written from the standpoint of someone running a Debian GNU/Linux based operating system (such as Debian or Ubuntu). We'd love to have install docs for Red Hat, Mac OS X, or other system types, so if you install it on one of those OSs, please let us know or make a wiki page for it.
Install the necessary packages on a Debian-based system:¶
sudo apt-get install ruby ruby1.8 rdoc rdoc1.8 ri ri1.8 irb irb1.8 ruby1.8-dev build-essential mysql-server libmysql-ruby libmysqlclient15off libmysqlclient15-dev imagemagick librmagick-ruby libmagick9-dev libopenssl-ruby git-core ffmpeg ffmpeg2theora bittornado libxapian-ruby1.8 libxapian15 libimage-exiftool-perl jhead
1/10/2009 - On Ubuntu 9.04 I had to replace libmagick9-dev with libmagickwand-dev
Install ruby gems:¶
wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz tar -xvzf rubygems-1.3.5.tgz cd rubygems-1.3.5 sudo ruby setup.rb sudo ln -s /usr/bin/gem1.8 /usr/bin/gem cd ..
Download and install necessary rubygems¶
gem sources -a http://gems.github.com sudo gem install rake ruby-debug daemons slave vpim json rio simple-rss mysql rmagick mongrel echoe will_paginate mini_exiftool Ruby-IRC calendar_date_select subdomain-fu shoulda hpricot quietbacktrace machinist faker acts_as_tree acts_as_list uploadcolumn
Grab the code¶
git clone git://git.escapegoat.org/hyperactive.git
OR if you can only check out via http due to firewall restrictions:
git clone http://git.escapegoat.org/git/hyperactive.git
If you know that you have commit access to the code, you can get it here:
git clone git@git.escapegoat.org:hyperactive.git
Install the torrent gem from the lib folder¶
sudo gem install hyperactive/lib/transmission-0.1.gem
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.