public
Description: Project Management, Collaboration and Time Tracking. Some additional features are implemented here compared to the original source.
Homepage: http://ari.github.com/clockingit/
Clone URL: git://github.com/ari/clockingit.git
Click here to lend your support to: clockingit and make a donation at www.pledgie.com !
name age message
file .boring Sat Jul 28 05:27:12 -0700 2007 [ClockingIT @ Collapse/Expand project list on O... [Fudge]
file .gitignore Thu Jun 25 17:01:18 -0700 2009 added lib/scripts/README [Brad Wilson]
file LICENSE Mon Apr 02 06:11:02 -0700 2007 [ClockingIT @ Add licensing information] I've ... [Fudge]
file README.rdoc Tue Jun 30 18:33:43 -0700 2009 Improve documentation now that rake gems:instal... [ari]
file RELEASE-NOTES Thu Jun 25 21:42:29 -0700 2009 Release notes for new email functionality. [ari]
file Rakefile Tue Apr 15 12:04:00 -0700 2008 Try to sort out the testing mess [Fudge]
directory app/ Thu Jul 02 03:15:26 -0700 2009 just render nothing for toggle_menu as it is al... [Brad Wilson]
directory config/ Thu Jul 02 02:17:08 -0700 2009 comment tuneup as it is making dev really slow [Brad Wilson]
directory db/ Wed Jul 01 01:02:49 -0700 2009 can add/remove customers to tasks [Brad Wilson]
directory dump/ Mon Sep 22 00:59:51 -0700 2008 Don't export news items and cached reports [Erlend Simonsen]
directory index/ Mon Jun 16 10:42:56 -0700 2008 Make sure ferret index directory is created [Fudge]
directory lang/ Sat Apr 04 06:04:02 -0700 2009 Updated language files [Fudge]
directory lib/ Wed Jul 01 01:12:58 -0700 2009 Merge branch 'master' of git://github.com/ari/c... [Brad Wilson]
directory log/ Wed May 13 02:50:36 -0700 2009 Part 2: add empty log directory. [ari]
directory public/ Wed Jul 01 01:12:58 -0700 2009 Merge branch 'master' of git://github.com/ari/c... [Brad Wilson]
directory resources/ Fri May 29 21:24:13 -0700 2009 Improve graphic design of login screen. [ari]
directory script/ Sun Apr 26 03:36:11 -0700 2009 Upgrade Rails to 2.3.2 and update a few files t... [ari]
file setup.rb Sat May 09 15:26:31 -0700 2009 Typo in setup pointing to old environment file ... [ari]
directory test/ Thu Jul 02 03:10:49 -0700 2009 fix bug so allow task customers to be added on ... [Brad Wilson]
directory tmp/ Mon Jun 16 10:42:37 -0700 2008 Make sure some tmp directories are created [Fudge]
directory vendor/ Sun May 31 17:37:43 -0700 2009 added exception notification plugin and example... [Brad Wilson]

Installing CIT on your server

Step 1: Getting the source

The source is released under the MIT/X Consortium License.

The easiest way to get the source and easily update it from time to time is with git. You’ll need to install that on your machine and then run:

  git clone git://github.com/ari/clockingit.git

Step 2: Prerequsites

You need to be running some type of Unix: OSX, Linux, Solaris, BSD. Windows will probably not work. You will also need a database. MySQL has been heavily tested, and some people are running postgresql.

Install the following packages:

  • ruby gems
  • ruby mysql driver (you could also choose postgresql)
  • rake
  • ImageMagick

How to install these will differ on each platform. Some possibilities:

FreeBSD

  portinstall ruby-iconv ruby18-gems ruby18-mysql rubygem-rake ImageMagick

OSX

First install the Macports system from www.macports.org. Then:

  sudo port install rb-rubygems rb-mysql rb-rake ImageMagick

Other

Under other operating systems use your favourite package manager to ensure you have Ruby 1.8.x, rubygems, Imagemagick, Rake and the Ruby mysql driver installed.

Step 3: Phusion Passenger

Install Phusion Passenger from www.modrails.com/install.html You can also run CIT with Mongrel, but it tends to be a little easier with Phusion to set up.

Naturally you’ll want to be running Apache httpd and have an appropriate virtual host set up. There are lots of great resources out there to help with that. The virtual host should point to the top of the CIT installation directory.

Step 4: Setup configuration and database

  ruby setup.rb

Step 5: Ruby gems

There are a few Ruby gems which are needed for running CIT. Change directory into the top of your CIT installation, then type:

  rake gems:install

That will install the gems you need.

If you have trouble on OSX with the mysql gem (this seems to be an issue on 10.5 and 10.6), then try this

  sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-include=/opt/local/include/mysql5 --with-mysql-lib=/opt/local/lib/mysql5 --with-mysql-config=/opt/local/lib/mysql5/bin/mysql_config

Upgrading to a newer revision

  git checkout db/schema.rb
  git pull

Next, make sure the database is updated and javascript/css rebuilt.

  rake db:migrate RAILS_ENV=production
  rake asset:packager:build_all

Depending on which environment you are updating, you can change the RAIL_ENV value to "test" or "development" and the appropriate database will be updated.

Find the daemons running with

  ps ax | grep ruby

then kill each of the three running daemons.

Restart daemons

  cd /usr/local/www/clockingit
  nohup ./script/push_server &
  ./script/ferret_server -e production start
  apachectl restart

Setting up Email Integration

You need to set up your email software so that it sends all emails for a subdomain to your rails user, and set up the alias so that it runs the mailman script.

For example to configure sendmail to pass to ClockingIT all emails sent to domain.com. See www.freebsd.org/doc/en/books/handbook/sendmail.html for more help on configuring sendmail on FreeBSD systems.

Add an entry to /etc/mail/local-host-names to contain your domain

  domain.com

Add an entry to /etc/mail/aliases to create an alias that will hand off emails to the mailman script

  cit: "|/path/to/cit/script/runner -e production 'Mailman.receive(STDIN.read)'"

Add an entry to /etc/mail/virtusertable to redirect all emails to your domain to the above alias

  @domain.com        cit

run "make; make restart" in /etc/mail