The ruby oci8 gem and legacy oracle database
Download
1 / 20

The ruby-oci8 gem and legacy Oracle database - PowerPoint PPT Presentation


  • 78 Views
  • Uploaded on

The ruby-oci8 gem and legacy Oracle database. Oracle!!!!. EZ DC Application. Existing Java application with Oracle 11gR2 data store Collect data about peer reviews Number of attendees Length of meeting Number of defects found Action items

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' The ruby-oci8 gem and legacy Oracle database' - bary


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

Ez dc application
EZ DC Application

  • Existing Java application with Oracle 11gR2 data store

  • Collect data about peer reviews

    • Number of attendees

    • Length of meeting

    • Number of defects found

    • Action items

  • Replaces individual Word document for each review

  • Provides the ability to create and publish reports


Ezdc admin application
EZDC Admin Application

  • Missing admin functionality

    • Adding, deleting, updating users

    • Adding new contracts

    • Implementing changes to peer reviews

    • Delete tickets from releases

  • Reasons for creating a separate application

    • No budget for expanding the EZ DC app

    • Simpler to implement security

    • The Geniuses In Disguise™ need practice with Rails


Hey kids let s put on a show
Hey kids! Let’s put on a show!

build a Rails app!


Architecture
Architecture

Project User

Admin User

EZ DC

EZ DC Admin

Oracle DB


Ch ch changes
Ch-ch-changes

  • Adjustments to “The Rails Way” to use the legacy Oracle database

  • Communicating with Oracle

  • We’ll be back


The rails part is the easy part
The Rails Partis the Easy Part

  • Gems

    • ruby-oci8(http://ruby-oci8.rubyforge.org/en/)

    • activerecord-oracle_enhanced-adapter(https://github.com/rsim/oracle-enhanced)

  • database.yml

  • user.rb (for example)


Gemfile
Gemfile

source 'https://rubygems.org'

gem 'rails', '3.2.13'

gem 'bootstrap-sass'

# To use ActiveModelhas_secure_password

# gem 'bcrypt-ruby'

group :development, :testdo

gem 'ruby-oci8', '2.1.5'

gem 'activerecord-oracle_enhanced-adapter', '1.4.1’

end


D atabase yml
database.yml

# Oracle/OCI 8i, 9, 10g

# Requires Ruby/OCI8:

# http://rubyforge.org/projects/ruby-oci8/

#

# for database running in localhost with application

# database: 127.0.0.1/xe

# for database running in a separate VM from application

# << IP address >> / xe

development:

adapter:oracle_enhanced

database:192.168.195.58:1521/xe

username:<<user_name>>

password:<<password>>


U ser rb
user.rb

# == Schema Information

# Table name: cmmi_user

# cmmi_user_id :integer not null, primary key

class User < ActiveRecord::Base

# specify schema and table name

self.table_name='cmmi_user'

# specify primary key name

self.primary_key='cmmi_user_id'

# specify sequence name

self.sequence_name='cmmi_user_id_seq'


Rails to oracle comm path
Rails to Oracle Comm Path

Oracle 11gR2Database


Oracle instant client
Oracle Instant Client

  • Download and unzip the required packages:

    • Oracle Instant Client Package – Basic Lite

    • Oracle Instant Client Package – SQL*Plus

    • Oracle Instant Client Package – SDK (optional)

  • Create a symbolic link to the instant client library:$ sudoln -s libclntsh.so.11.1 libclntsh.so

  • Set the library search path:

    • LD_Library_Path on Linux

    • DYLD_Library_Path on Mac OS X


Vm static ip
VM Static IP

  • Using a virtual machine with IP address assigned dynamically by DHCP at startup

  • Fix a static IP address by modifying VM config file:/Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf

    ####### VMNET DHCP Configuration. End of "DO NOT MODIFY SECTION" #######

    host Windows_8_x64_100GB {

    hardware ethernet 00:0C:29:D4:60:40;

    fixed-address 192.168.195.58;

    }


References
References

  • ruby-oci8

    • http://ruby-oci8.rubyforge.org/

  • activerecord-oracle_enhanced-adapter

    • https://github.com/rsim/oracle-enhanced

  • DHCP on VMware Fusion

    • http://www.thirdbit.net/articles/2008/03/04/dhcp-on-vmware-fusion/

  • Oracle Instant Client

    • http://ruby-oci8.rubyforge.org/en/file.install-instant-client.html

    • http://www.oracle.com/technetwork/database/features/instant-client/index-100365.html?ssSourceSiteId=ocomen

  • Environment Variables

    • https://help.ubuntu.com/community/EnvironmentVariables

    • https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/366728



ad