the ruby-oci8 gem and legacy oracle database
DESCRIPTION
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 - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: The ruby-oci8 gem and legacy Oracle database](https://reader038.vdocuments.us/reader038/viewer/2022102819/56816935550346895de08fc9/html5/thumbnails/1.jpg)
The ruby-oci8 gem and legacy Oracle
database
Oracle!!!!
![Page 2: The ruby-oci8 gem and legacy Oracle database](https://reader038.vdocuments.us/reader038/viewer/2022102819/56816935550346895de08fc9/html5/thumbnails/2.jpg)
EZ DC ApplicationExisting Java application with Oracle 11gR2 data store
Collect data about peer reviewsNumber of attendeesLength of meetingNumber of defects foundAction items
Replaces individual Word document for each review
Provides the ability to create and publish reports
![Page 3: The ruby-oci8 gem and legacy Oracle database](https://reader038.vdocuments.us/reader038/viewer/2022102819/56816935550346895de08fc9/html5/thumbnails/3.jpg)
![Page 4: The ruby-oci8 gem and legacy Oracle database](https://reader038.vdocuments.us/reader038/viewer/2022102819/56816935550346895de08fc9/html5/thumbnails/4.jpg)
![Page 5: The ruby-oci8 gem and legacy Oracle database](https://reader038.vdocuments.us/reader038/viewer/2022102819/56816935550346895de08fc9/html5/thumbnails/5.jpg)
![Page 6: The ruby-oci8 gem and legacy Oracle database](https://reader038.vdocuments.us/reader038/viewer/2022102819/56816935550346895de08fc9/html5/thumbnails/6.jpg)
EZDC Admin ApplicationMissing admin functionality
Adding, deleting, updating usersAdding new contractsImplementing changes to peer reviewsDelete tickets from releases
Reasons for creating a separate applicationNo budget for expanding the EZ DC appSimpler to implement securityThe Geniuses In Disguise™ need practice with Rails
![Page 7: The ruby-oci8 gem and legacy Oracle database](https://reader038.vdocuments.us/reader038/viewer/2022102819/56816935550346895de08fc9/html5/thumbnails/7.jpg)
Hey kids! Let’s put on a show!
build a Rails app!
![Page 8: The ruby-oci8 gem and legacy Oracle database](https://reader038.vdocuments.us/reader038/viewer/2022102819/56816935550346895de08fc9/html5/thumbnails/8.jpg)
Architecture
Oracle DB
EZ DC AdminEZ DC
Project User
Admin User
![Page 9: The ruby-oci8 gem and legacy Oracle database](https://reader038.vdocuments.us/reader038/viewer/2022102819/56816935550346895de08fc9/html5/thumbnails/9.jpg)
![Page 10: The ruby-oci8 gem and legacy Oracle database](https://reader038.vdocuments.us/reader038/viewer/2022102819/56816935550346895de08fc9/html5/thumbnails/10.jpg)
![Page 11: The ruby-oci8 gem and legacy Oracle database](https://reader038.vdocuments.us/reader038/viewer/2022102819/56816935550346895de08fc9/html5/thumbnails/11.jpg)
Ch-ch-changesAdjustments to “The Rails Way” to use the legacy Oracle database
Communicating with Oracle
We’ll be back
![Page 12: The ruby-oci8 gem and legacy Oracle database](https://reader038.vdocuments.us/reader038/viewer/2022102819/56816935550346895de08fc9/html5/thumbnails/12.jpg)
The Rails Partis the Easy Part
Gemsruby-oci8 (http://ruby-oci8.rubyforge.org/en/)activerecord-oracle_enhanced-adapter (https://github.com/rsim/oracle-enhanced)
database.yml
user.rb (for example)
![Page 13: The ruby-oci8 gem and legacy Oracle database](https://reader038.vdocuments.us/reader038/viewer/2022102819/56816935550346895de08fc9/html5/thumbnails/13.jpg)
Gemfilesource 'https://rubygems.org'
gem 'rails', '3.2.13'gem 'bootstrap-sass'
# To use ActiveModel has_secure_password# gem 'bcrypt-ruby'
group :development, :test do gem 'ruby-oci8', '2.1.5' gem 'activerecord-oracle_enhanced-adapter', '1.4.1’end
![Page 14: The ruby-oci8 gem and legacy Oracle database](https://reader038.vdocuments.us/reader038/viewer/2022102819/56816935550346895de08fc9/html5/thumbnails/14.jpg)
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>>
![Page 15: The ruby-oci8 gem and legacy Oracle database](https://reader038.vdocuments.us/reader038/viewer/2022102819/56816935550346895de08fc9/html5/thumbnails/15.jpg)
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'
![Page 16: The ruby-oci8 gem and legacy Oracle database](https://reader038.vdocuments.us/reader038/viewer/2022102819/56816935550346895de08fc9/html5/thumbnails/16.jpg)
Rails to Oracle Comm Path
ruby-oci8
activerecord-oracle_enhanced-
adapter
Oracle Instant Client
Oracle 11gR2Database
![Page 17: The ruby-oci8 gem and legacy Oracle database](https://reader038.vdocuments.us/reader038/viewer/2022102819/56816935550346895de08fc9/html5/thumbnails/17.jpg)
Oracle Instant ClientDownload and unzip the required packages:
Oracle Instant Client Package – Basic LiteOracle Instant Client Package – SQL*PlusOracle Instant Client Package – SDK (optional)
Create a symbolic link to the instant client library:
$ sudo ln -s libclntsh.so.11.1 libclntsh.so
Set the library search path:LD_Library_Path on LinuxDYLD_Library_Path on Mac OS X
![Page 18: The ruby-oci8 gem and legacy Oracle database](https://reader038.vdocuments.us/reader038/viewer/2022102819/56816935550346895de08fc9/html5/thumbnails/18.jpg)
VM Static IPUsing 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;}
![Page 19: The ruby-oci8 gem and legacy Oracle database](https://reader038.vdocuments.us/reader038/viewer/2022102819/56816935550346895de08fc9/html5/thumbnails/19.jpg)
Referencesruby-oci8
http://ruby-oci8.rubyforge.org/
activerecord-oracle_enhanced-adapterhttps://github.com/rsim/oracle-enhanced
DHCP on VMware Fusionhttp://www.thirdbit.net/articles/2008/03/04/dhcp-on-vmware-fusion/
Oracle Instant Clienthttp://ruby-oci8.rubyforge.org/en/file.install-instant-client.htmlhttp://www.oracle.com/technetwork/database/features/instant-client/index-100365.html?ssSourceSiteId=ocomen
Environment Variableshttps://help.ubuntu.com/community/EnvironmentVariableshttps://bugs.launchpad.net/ubuntu/+source/xorg/+bug/366728
![Page 20: The ruby-oci8 gem and legacy Oracle database](https://reader038.vdocuments.us/reader038/viewer/2022102819/56816935550346895de08fc9/html5/thumbnails/20.jpg)
Questions?