Creating a Linux Development Environment for Expertiza - Installation Guide

From Expertiza_Wiki
Revision as of 01:07, 12 March 2013 by Hliu11 (talk | contribs) (→‎Linux Package Installation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page explains the steps needed to create an Expertiza development environment under a Linux Ubuntu distribution. It might be a good idea to create a virtual machine with this Linux environment.

NOTE: This document is open to be edited by students. Please feel free to add steps required for other platforms or workarounds to any particular problems you had. The authoritative version of this document is on the wolf wiki here

Thrid Party Software Installation

Linux Package Installation

  1. Update your package sources
    sudo apt-get update
    or
    sudo yum update
  2. Install ruby, irb, ri, rdoc and ruby1.8-dev.
    sudo apt-get install ruby irb ri rdoc
    sudo apt-get install ruby1.8-dev libaspell-dev
    sudo yum install aspell-devel
  3. Install the latest rubygem package (at the moment of the writting is 1.3.7)
    wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
    tar -xzvf rubygems-1.3.7.tgz
    cd rubygems-1.3.7
    sudo ruby setup.rb
  4. Verify you have the correct version of rubygem (should output 1.3.7)
    gem -v
  5. Install MySQL server and client. When prompted, leave the root password empty.
    sudo apt-get install mysql-server mysql-client
  6. Install the required libraries to develop with MySQL under ruby.
    sudo apt-get install libmysql-ruby libmysqlclient-dev
  7. Install the SSL libraries.
    sudo apt-get install libssl-dev
    sudo apt-get install libopenssl-ruby1.8
    sudo apt-get install libopenssl-ruby
  8. Install Graphviz (choose the version of your system)
    sudo apt-get install graphviz
  9. Install SQL fairy that allows to generate the current DB diagram schema
    sudo apt-get install sqlfairy

Ruby Gems Installation

  1. List the currently installed gems
    sudo gem list --local
  2. Install the rails gem currently used by Expertiza (2.2.2)
    sudo gem install rails -v 2.2.2
  3. Install other gems used in the project
    sudo rake gems:install
  4. Install Graphr. For instructions refer to the GraphR website.

Expertiza Development Environment

Source Code

Visit https://github.com/expertiza/expertiza for the repository URL. Make sure you're logged in if you have commit access, because the URL will be different.

git clone (repository URL)

See https://help.github.com for help on setting up git, authenticating with SSH keys, and checking out a repository.

Set up databases

  1. Go to the expertiza directory.
    cd expertiza
  2. Create the development and test databases.
    rake db:create:all
  3. Run the Expertiza database migrations. This should populate your database with the current tables of the schema.
    rake db:migrate

Running Expertiza

  1. Go to the trunk directory if you are not already there.
  2. Start the web server.
    ruby script/server
  3. Open a web browser to verify if the application is running as expected.
    http://localhost:3000/

The administrator account for the development environment can be accessed using the login and password string “admin”. You may need to add additional users during your development.

Developing Expertiza

If you like developing under Linux, emacs or vim offer good functionality for ruby development. However, you can use the editors available in Windows, such as Notepad++. To browse the linux directories from the Windows Explorer you can use ExpanDrive provided by NCSU or WinScp. Similarly you can use Putty to communicate with the linux server.


Back to Expertiza Main page.