<?xml version="1.0" encoding="UTF-8"?>
<project>
  <bugtracker-url nil="true"></bugtracker-url>
  <created-at type="datetime">2008-03-21T05:30:42Z</created-at>
  <description>&lt;pre&gt;
&lt;h2&gt;Prt.Sc taken during development&lt;/h2&gt;
  &lt;strong&gt;pic01:&lt;/strong&gt; http://skitch.com/dscape/eki7/ubuntu
  &lt;strong&gt;pic02:&lt;/strong&gt; http://skitch.com/dscape/efsc/the-db2-on-campus-portal-question-2
  &lt;strong&gt;pic03:&lt;/strong&gt; http://skitch.com/dscape/efip/the-db2-on-campus-portal-failed-you-will-have-to-try-again
  &lt;strong&gt;pic04:&lt;/strong&gt; http://skitch.com/dscape/efsx/the-db2-on-campus-portal-failed-you-will-have-to-try-again
  &lt;strong&gt;pic05:&lt;/strong&gt; http://skitch.com/dscape/efu9/the-db2-on-campus-portal-question-1
  &lt;strong&gt;pic06:&lt;/strong&gt; http://skitch.com/dscape/87fx/the-db2-on-campus-portal-prepare-yourself-for-the-certification-exam
  &lt;strong&gt;pic08:&lt;/strong&gt; http://skitch.com/dscape/87fb/the-db2-on-campus-portal-recover-your-password
  &lt;strong&gt;pic09:&lt;/strong&gt; http://skitch.com/dscape/87fy/the-db2-on-campus-portal-create-your-own-profile
  &lt;strong&gt;pic10:&lt;/strong&gt; http://skitch.com/dscape/87r6/the-db2-on-campus-portal-prepare-yourself-for-the-certification-exam
  &lt;strong&gt;pic11:&lt;/strong&gt; http://skitch.com/dscape/87r7/the-db2-on-campus-portal-changing-your-password
  &lt;strong&gt;pic12:&lt;/strong&gt; http://skitch.com/dscape/87rh/the-db2-on-campus-portal-update-your-profile
  &lt;strong&gt;pic13:&lt;/strong&gt; http://skitch.com/dscape/87r4/the-db2-on-campus-portal-changing-roles
  &lt;strong&gt;pic14:&lt;/strong&gt; http://skitch.com/dscape/87r2/the-db2-on-campus-portal-welcome-to-the-students-lounge
  &lt;strong&gt;pic15:&lt;/strong&gt; http://skitch.com/dscape/87ra/the-db2-on-campus-portal-welcome-to-the-students-lounge
  &lt;strong&gt;pic16:&lt;/strong&gt; http://skitch.com/dscape/87rw/the-db2-on-campus-portal-welcome-to-the-students-lounge
  &lt;strong&gt;pic17:&lt;/strong&gt; http://skitch.com/dscape/8arq/the-db2-on-campus-portal-prepare-yourself-for-the-certification-exam

&lt;h2&gt;Installation Instructions&lt;/h2&gt;
&lt;small &gt;{ project home: http://gitorious.org/projects/online-testing-system/ }&lt;/small&gt;
&lt;small&gt;{ made on Ubuntu Hardy Heron 8.04 latest beta }&lt;/small&gt;

&lt;h3&gt;(db) Instructions for Installing DB2 Express-C&lt;/h3&gt;
  &lt;strong&gt;db1:&lt;/strong&gt; Download DB2 Express-C for Linux to ~/Desktop
    ref: ftp://ftp.software.ibm.com/software/data/db2/express/latest_debs/
  &lt;strong&gt;db2:&lt;/strong&gt; Install dependencies
    $ sudo apt-get install libstdc++5
    $ sudo apt-get install libaio-dev
  &lt;strong&gt;db3:&lt;/strong&gt; Install and Configure
    $ cd ~/Desktop &amp;&amp; sudo gdebi-gtk db2exc_9.5.0-1_i386.deb
       ( wait a minute/hour and hit install package )
    further instructions at: * http://tldp.org/HOWTO/DB2-HOWTO/ubuntu704.html
                             * http://caos.di.uminho.pt/~db2/blog/17/2007/12/06/express-c-starting/
  &lt;strong&gt;db4:&lt;/strong&gt; export PATH &lt;small&gt;&lt;em&gt;(not necessary with deb installer, considering you use db2inst1 as your db2 username)&lt;/em&gt;&lt;/small&gt;
    $ export IBM_DB_DIR=/home/db2inst1/sqllib
    $ export IBM_DB_LIB=/home/db2inst1/sqllib/lib

&lt;h3&gt;(d) Instructions for Development Environment:&lt;/h3&gt;
  &lt;strong&gt;d1:&lt;/strong&gt; Install dependencies
     $ sudo apt-get install build-essential
     $ sudo apt-get install ruby irb rdoc rubygems ruby1.8-dev curl
     $ sudo apt-get install git-core
     $ cd ~/Desktop
     $ git clone http://git.gitorious.org/online-testing-system/mainline.git
     $ sudo gem update --SYSTEM 
        (for proxy use option: -p http://someproxy.ibm.com:3128 *)
     $ sudo gem update 
        (**)
     $ sudo gem install rails mongrel ruby-debug

  &lt;strong&gt;d2:&lt;/strong&gt; Create database/schema in DB2
     $ db2start
     $ db2
     $ db2 =&gt; create database ots_db using codeset UTF-8 territory en-US
     $ db2 =&gt; connect to ots_db
     $ db2 =&gt; create schema ots_schema

  &lt;strong&gt;d3:&lt;/strong&gt; Install IBM_DB
     $ sudo gem install ibm_db --include-dependencies

  &lt;strong&gt;d4:&lt;/strong&gt; Create environment.rb and database.yml
     $ cd mainline &amp;&amp;  vim config/environment.rb
        EXAMPLE FILE - Thinking about production? &lt;strong&gt;CHANGE THE SECRET&lt;/strong&gt;

          &lt;strong&gt;&lt;small&gt;# EXAMPLE :: ENVIRONMENT.RB&lt;/small&gt;&lt;/strong&gt;

&lt;small&gt;RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION

require File.join(File.dirname(__FILE__), 'boot')
  
Rails::Initializer.run do |config|
  config.action_controller.session = {
    :session_key =&gt; '_ibm_ots_session',
    :secret      =&gt; '6fefb53efedf98e70177ecc529f4852cf4ff19d1b87e7dfb5fa66646141369'
  }
end

require 'lib/actionpack_ext.rb'&lt;/small&gt;

         &lt;strong&gt;&lt;small&gt;# EOF :: ENVIRONMENT.RB&lt;/small&gt;&lt;/strong&gt;

      $ vim config/database.yml

          &lt;strong&gt;&lt;small&gt;# EXAMPLE :: DATABASE.YML&lt;/small&gt;&lt;/strong&gt;

&lt;small&gt;development:
  adapter: ibm_db
  database: ots_db
  schema: ots_schema
  username: someuser
  password: isasecret

testing:
  adapter: ibm_db
  database: ots_test_db
  schema: ots_test_schema
  username: someuser
  password: isasecret

production:
  adapter: ibm_db
  database: ots_prod_db
  schema: ots_prod_schema
  username: someuser
  password: isasecret&lt;/small&gt;

         &lt;strong&gt;&lt;small&gt;# EOF :: DATABASE.YML&lt;/small&gt;&lt;/strong&gt;

  &lt;strong&gt;d5:&lt;/strong&gt; Configure the SMTP mail server
    Configure the config/initializers/mail.rb to use the server you desire. (it's commented for now)
    Not necessary for development. Simply check the mongrel server for the activation key.

    Colaboration from Arvind Gupta

      For smtp configuration I have followed instruction on
      http://www.prestonlee.com/archives/63

      I have added a file smtp_tls.rb in lib folder with the code

      &lt;strong&gt;&lt;small&gt;# EXAMPLE :: SMTP_TLS.RB&lt;/small&gt;&lt;/strong&gt;

&lt;small&gt;require "openssl"

require "net/smtp"


Net::SMTP.class_eval do

  private

  def do_start(helodomain, user, secret, authtype)

    raise IOError, 'SMTP session already started' if @started

    check_auth_args user, secret, authtype if user or secret

    
    sock = timeout(@open_timeout) { TCPSocket.open(@address, @port) }

    @socket = Net::InternetMessageIO.new(sock)

    @socket.read_timeout = 60 #@read_timeout

    
    check_response(critical { recv_response() })

    do_helo(helodomain)

    
    if starttls

      raise 'openssl library not installed' unless defined?(OpenSSL)

      ssl = OpenSSL::SSL::SSLSocket.new(sock)

      ssl.sync_close = true

      ssl.connect

      @socket = Net::InternetMessageIO.new(ssl)

      @socket.read_timeout = 60 #@read_timeout

      do_helo(helodomain)

    end
    

    authenticate user, secret, authtype if user

    @started = true

  ensure
    unless @started

      # authentication failed, cancel connection.
      @socket.close if not @started and @socket and not @socket.closed?

      @socket = nil

    end
  end

  
  def do_helo(helodomain)

    begin
      if @esmtp

        ehlo helodomain
      else

        helo helodomain
      end

    rescue Net::ProtocolError

      if @esmtp

        @esmtp = false

        @error_occured = false

        retry

      end
      raise

    end
  end

  
  def starttls

    getok('STARTTLS') rescue return false

  return true

  end
  

  def quit

    begin
      getok('QUIT')

    rescue EOFError

    end
  end

end&lt;/small&gt;

      &lt;strong&gt;&lt;small&gt;# EXAMPLE :: SMTP_TLS.RB&lt;/small&gt;&lt;/strong&gt;

      And added this code to config/environment.rb

      &lt;strong&gt;&lt;small&gt;# PARTIAL EXAMPLE :: ENVIRONMENT.RB&lt;/small&gt;&lt;/strong&gt;

&lt;small&gt;require "smtp_tls"

ActionMailer::Base.smtp_settings = {:address =&gt; "smtp.gmail.com",
:port =&gt; 587,
:authentication =&gt; :plain,
:user_name =&gt; "arvindfakeemail@gmail.com",
:password =&gt; 'someonesPassword'}&lt;/small&gt;

      &lt;strong&gt;&lt;small&gt;# EOF :: ENVIRONMENT.RB&lt;/small&gt;&lt;/strong&gt;

  &lt;strong&gt;d6:&lt;/strong&gt; Start the server
    $ rake db:migrate
    $ ./script/server
    ( browse to http://localhost:3000 to check the site )

  &lt;strong&gt;d7:&lt;/strong&gt; Give yourself root
    $ ./script/console
    $ &gt;&gt; u = User.find_by_login 'dscape' # replace dscape for your login name
    $ &gt;&gt; u.roles &lt;&lt; Role.find_by_name('root')
       ( now just refresh the webapp and you are root! )


&lt;h3&gt;(t) Instructions for Testing Environment:&lt;/h3&gt;
TDB

&lt;h3&gt;(p) Instructions for Production Environment:&lt;/h3&gt;
  ref: http://www.modrails.com/
  TDB

&lt;h3&gt;Notes:&lt;/h3&gt;
   *  in event of error consult: http://elia.wordpress.com/2007/07/18/gems-through-the-proxy-or-the-undefined-method-error/
      As you are not in Mac OS X you should simply: sudo vim /usr/lib/ruby/1.8/rubygems/config_file.rb and then do the things he says.
   ** in event of error consult: http://www.nickpeters.net/2007/12/31/fix-for-uninitialized-constant-gemgemrunner-nameerror/
      Don't forget to sudo vim or you won't be able to change the file.

&lt;h3&gt;Thank you&lt;/h3&gt;
  * &lt;a href="http://www.vitorrodrigues.com" target="_blank"&gt;V&#237;tor Rodrigues&lt;/a&gt; for the support, articles and samples on pureXML.
  * &lt;a href="http://www.alcidesfonseca.com" target="_blank"&gt;Alcides Fonseca&lt;/a&gt; for the prototype support.
  * &lt;a href="http://db2expressc.blogspot.com/" target="_blank"&gt;Raul Chong&lt;/a&gt; for the help with the documentation and testing.
  * &lt;a href="http://www.linkedin.com/in/bernaulli" target="_blank"&gt;Arvind Gupta&lt;/a&gt; for the help with gmail mailer.rb.
&lt;/pre&gt;</description>
  <home-url nil="true"></home-url>
  <license>MIT License</license>
  <mailinglist-url nil="true"></mailinglist-url>
  <slug>online-testing-system</slug>
  <title>Online Testing System</title>
  <wiki-enabled type="boolean">true</wiki-enabled>
  <owner kind="User">dscape</owner>
  <repositories type="array">
    <mainlines type="array">
      <repository>
        <id>388</id>
        <name>mainline</name>
        <owner kind="User">dscape</owner>
        <clone_url>git://gitorious.org/online-testing-system/mainline.git</clone_url>
      </repository>
    </mainlines>
    <clones type="array">
    </clones>
  </repositories>
</project>
