Skip to content
gnomet edited this page May 13, 2012 · 53 revisions

Welcome to the Kassi wiki!

Installation instructions

NOTE: these installation instructionss are bit vague at the moment. If you try installing and encounter problems, please report them for example in Issues. And if you notice some steps missing, please edit the wiki and add them. We also try to keep enhancing the level of the documentation.

Below the installation instructions there is space for OS-specific tips, so if you have problems, check there, and if you get your problem solved, add instructions to the tips section.

  1. Install
    • “Ruby (we use version 1.8.7 and don’t guarantee everything working with others. If you need multiple versions of Ruby, RVM can help.)
    • RubyGems
    • Bundler gem install bundler
    • Git.
  2. If want to use ASI (Aalto Social Interface) to manage user accounts, take a look at Kassi and ASI page. IF you don’t know about ASI, just ignore this one.
  3. Get the code (git clone is probably easiest way: git clone git://github.com/sizzlelab/kassi.git)
  4. cp config/database.example.yml config/database.yml
  5. You need to have a database available for Kassi. And a user that has access to it. (If you are going to do development you should have separate databases for development and testing also).
  6. Edit details according to your database to database.yml (if you are not going to develop Kassi, it’s enough to fill in the production database)
    • Probably you only need to change the passwords to the same that you used when creating the databases.
  7. cp config/config.example.yml config/config.yml
  8. Edit details according to your system configuration to config.yml. If there is something unclear, post a question for example to Issues.
  9. Install Sphinx. Version 0.9.9 is recommended as we haven’t tested Kassi with newer ones. See Sphinx installation instructions. (no need to start it yet. You can try running searchd command, but it should fail at this point complaining about missing config)
  10. Install Imagemagick
  11. You can install optional Memcached if you want to enable faster caching in production environment.
  12. You may have more success installing the mysql gem manually at this point, particularly on Mac OS X 10.6 (see tips below)
    gem install mysql
  13. run bundle install in the project root directory (kassi) to install required gems
  14. (In the following 3 commands, leave out the RAILS_ENV=production part if you want to get Kassi running in development mode.) Load the database structure to your database: rake RAILS_ENV=production db:schema:load
  15. run sphinx index rake RAILS_ENV=production thinking_sphinx:index
  16. start sphinx daemon rake RAILS_ENV=production thinking_sphinx:start
  17. Kassi server can serve multiple Kassi communities that are separated by subdomains. You need at least one community to use Kassi. You can create communities currently by opening the rails console (with command rails console production (or leave the production away if you want to create a community for the develepment env)). In the console use command Community.create({:name=>"name_of_your_community",:domain=>"ourcommunity"}) to create a community that can be accessed in http://ourcommunity.yourdomain.com. If you don’t have a separate domain, you can use lvh.me to point to localhost. (e.g. http://ourcommunity.lvh.me:3000 if server in default port 3000).
  18. If you want to enable Kassi to send email locally (in the development environment), you might want to change the email settings in the config file. There is an example of configuring settings using a gmail account, but you can also use any other SMTP server. If you do not touch the settings, the development version works otherwise normally but might crash in instances where it tries to send email (like when sending a message to another user).
  19. Invoke the delayed job worker on your local machine: rake jobs:work . The worker processes tasks that are done in the background, like sending email notifications and assigning badges to people.
  20. Start the server. There are many options for this, lately we have been using Passenger, but the simplest way is to use command rails server which will start it on Mongrel, that is good option for development use.

Tips for different platforms and OS

Windows
  • Note that the installation instructions are written for *nix-based systems so you need to change the commands a little to make them work in windows (e.g. cp becomes copy in windows)
  • There is a separate guide for windows installation written by vbtdung
Mac Os X
  • If you are using MySQL, please note that Mac OS X 10.6 requires a 64-bit version of MySQL.
  • Installing mysql gem might work better with this command:
    env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
    (you will need to make sure that the path to mysql_config is correct)
  • Paths and mysql-libs can cause problems with sphinx. At one computer running OS X we tried all kinds of trick to let sphinx know where the mysql libraries are, but none of them fixed the issue. The final and working method was to copy the missing library file directly to the project directory.. :D

Administering the installed Kassi server

Most of the management operations need to be done in the Rails console.Admin of kassi server page contains some help for that.

Contribute to development

If you want to see what is currently being done by the core development team, you can take a look at the Pivotal Tracker

  1. Install git: instructions
  2. If you are a collaborator, see Collaborator guide otherwise fork the project.
  3. Check git instructions if needed from: learn.github.com
  4. Run all tests and make sure they all pass. (see bottom of the Coding Guidelines page for details.)
  5. Make changes to the code and do tests for your features. See our Coding Guidelines if you need guidance in this!
  6. Make sure the old and new tests pass.
  7. Commiting changes with informative english commit message that explains the changes you’ve made. This article gives nice example of how to format commit comments.
    • if you are a collaborator, you can push directly, if you set the ssh-key on your profile
    • otherwise make a push to your own forked repository and if you thing that the commit would be useful for the main Kassi branch, please make a pull request by clicking the “Pull request” button in your project or on the page of your commit. This github guide explains forking nicely.