Online Testing System
Installation Instructions
{ project home: http://gitorious.org/projects/online-testing-system/ } { made on Ubuntu Hardy Heron 8.04 latest beta }(db) Instructions for Installing DB2 Express-C
db1: Download DB2 Express-C for Linux to ~/Desktop ref: ftp://ftp.software.ibm.com/software/data/db2/express/latest_debs/ db2: Install dependencies $ sudo apt-get install libstdc++5 $ sudo apt-get install libaio-dev db3: Install and Configure $ cd ~/Desktop && 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/ db4: export PATH (not necessary with deb installer, considering you use db2inst1 as your db2 username) $ export IBM_DB_DIR=/home/db2inst1/sqllib $ export IBM_DB_LIB=/home/db2inst1/sqllib/lib(d) Instructions for Development Environment:
d1: 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 d2: Create database/schema in DB2 $ db2start $ db2 $ db2 => create database ots_db using codeset UTF-8 territory en-US $ db2 => connect to ots_db $ db2 => create schema ots_schema d3: Install IBM_DB $ sudo gem install ibm_db --include-dependencies d4: Create environment.rb and database.yml $ cd mainline && vim config/environment.rb EXAMPLE FILE - Thinking about production? CHANGE THE SECRET # cut bellow 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 => '_ibm_ots_session', :secret => '6fefb53efedf98e70177ecc529f4852cf4ff19d1b87e7dfb5fa6664614136c6e56b9ae932a5d882331ebe9acd2489e7e83b2f6a1de005eb331b8770b827fd327' } end require 'lib/actionpack_ext.rb' # eof $ vim config/database.yml # EXAMPLE FILE # cut bellow 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 # eof d5: 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. d6: Start the server $ rake db:migrate $ ./script/server ( browse to http://localhost:3000 to check the site ) d7: Give yourself root $ ./script/console $ >> u = User.find_by_login 'dscape' # replace dscape for your login name $ >> u.roles << Role.find_by_name('root') ( now just refresh the webapp and you are root! )(t) Instructions for Testing Environment:
TDB(p) Instructions for Production Environment:
ref: http://www.modrails.com/ TDBNotes:
* 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.Thank you
* Vítor Rodrigues for the support, articles and samples on pureXML. * Alcides Fonseca for the prototype support. * Raul Chong for the help with the documentation and testing.
Activities
-
Saturday May 10
-
19:18
Comment
-
-
Friday March 21
-
05:53
Comment
-
