Wednesday, November 21, 2012

Installing RADAR on Ubuntu

 DRAFT-DRAFT-DRAFT  Please report any trouble to Prof. Gordon

Assumptions

  1. git client is installed (https://help.ubuntu.com/community/Git)
  2. You have an account with gitorious.org (https://gitorious.org/)
  3. You have created an ssh key and provided your public key to gitorious.org. (https://help.ubuntu.com/community/SSH/OpenSSH/Keys)
  4. You have ruby 1.9.3 and rvm installed.  (http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you)
Preparation

  1. Create a directory into which you want to place your Radar installation. For the sake of this document, we will refer to this directory as $RADAR_HOME
  2. cd $RADAR_HOME. All of the following activity occurs within your current directory as $RADAR_HOME. All file references are relative to $RADAR_HOME.
  3. git clone  git@github.com:rkgordon3/radar.git
  4. sudo apt-get install rake
  5. sudo apt-get install ruby-bundler
  6. bundle install

    If step 7 hangs, comment out the following lines in Gemfile 

    group :test do
            gem 'cucumber-rails', '1.2.1'
            gem 'rspec-rails', '2.7.0'
            gem 'database_cleaner', '0.7.0'
            gem 'factory_girl', '4.1.0'
            gem 'capybara'
    #       gem 'mongoid-rspec', :require => false
    end


    then run bundle install again, then uncomment above lines and run bundle install yet again.

  7. Create a file config/database.yml and put the following in this file:

    development:
       adapter: sqlite3
       database: db/development.sqlite3
       pool: 5
       timeout: 5000

    # Warning: The database defined as "test" will be erased and
    # re-generated from your development database when you run "rake".
    # Do not set this db to the same as development or production.
    test: &test
      adapter: sqlite3
      database: db/test.sqlite3
      pool: 5
      timeout: 5000

    cucumber:
      <<: *test

     
  8. rake db:migrate
  9. rake db:seed
Running Server

You can now run the rails server

rails s

This runs server on port 3000. You can change the port with a -p option.

The seeds file populated the development database with a user 
radar-admin@smumn.edu with password as 'password.' You can log in with that user and then add a couple users for your testing. 

Using Oracle

See this post if you are going to use Oracle database with Radar. In this case, you must also modify config/database.yml. Comment out the current values in the development: group and use these:

adapter: oracle_enhanced
database: ecs4
username:#ask Prof Gordon
password:  #ask Prof Gordon
host: #ask Prof Gordon 

No comments:

Post a Comment