Introduction
QA Reports is a Ruby on Rails application so you need to install a bunch of stuff to get it up and running. This documentation is based on Ubuntu 10.10
Install Ruby
Packaged version of Ruby tends to be pretty old and won't probably won't work very well. Thus this guide uses Ruby Version Manager (rvm).
- Install dependencies:
$ sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libqt4-dev
- Install rvm: $ bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) # NOTE: if network proxy blocks cloning via git proxy, try download the script and change git to http
- Follow the instructions printed once installation is ready
- Install needed packages - check section "For Ruby (MRI & ree) you should install the following OS dependencies"
- Enable loading of rvm - check section "You must now complete the install by loading RVM in new shells"
- Edit .bashrc as described
- Restart your shell to have rvm enabled
- Install Ruby: $ rvm install ree
- Set into use: $ rvm use ree
- If you want to use this ruby version as a default, use $ rvm --default use ree
- $ gem update --system
Set up QA Reports
- Install preqrequisites:
- $ sudo apt-get install libmysqlclient-dev mysql-server libxml2-dev libxslt1-dev
- $ gem install bundler --no-ri --no-rdoc
- Clone qa-reports from git: $ git clone git://gitorious.org/meego-quality-assurance/qa-reports.git
- $ cd qa-reports
- $ bundle install --without staging production (If bundle install fails, run $ apt-get install libqt4-dev first.)
- $ cp config/database.example.yml config/database.yml
Create MySQL user and two databases, one for development and the other for executing the tests
- $ mysql -u root -p
- mysql> create user 'qa_reports'@'localhost' identified by '<password_of_your_choosing>';
- mysql> create database qa_reports_development;
- mysql> create database qa_reports_test;
- mysql> grant all on qa_reports_development.* to 'qa_reports'@'localhost';
- mysql> grant all on qa_reports_test.* to 'qa_reports'@'localhost';
- mysql> exit
Configure QA Reports to use MySQL databases by editing config/database.yml as shown below
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: qa_reports_development
pool: 5
username: qa_reports
password: <password_of_your_choosing>
socket: /var/run/mysqld/mysqld.sock
test:
adapter: mysql2
encoding: utf8
reconnect: false
database: qa_reports_test
pool: 5
username: qa_reports
password: <password_of_your_choosing>
socket: /var/run/mysqld/mysqld.sock
Run the migrations
- $ bundle exec rake db:migrate
Run the tests and start the server
- $ bundle exec rake spec, all unit tests should pass
- $ bundle exec rake cucumber, all integration tests should pass
- Start the server: $ bundle exec rails server
- Register a new user for yourself: http://localhost:3000/users/register