build ruby- get instantclient
build gem
use gem to install rails
instantclient-basic- on mac, make this link
instantclient-sdk
note: build against this, ok to run against the .so's in /usr/lib
cd .../instantclient_10_2- build ruby-oci8 from http://ruby-oci8.rubyforge.org/en/index.html
ln -s libclntsh.dylib.10.1 libclntsh.dylib
export DYLD_LIBRARY_PATH=.../instantclient_10_2- test (this is on one line)
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
ruby -r oci8 -e "OCI8.new('nm/pass@db').exec('select * from user_tables') do |r| puts r.join(','); end"- Install the activerecord-oracle_enhanced-adapter gem, NOT, as many pages out-of-dately specify, activerecord-oracle-adapter
gem install activerecord-oracle_enhanced-adapterconfig/database.yml:
development:- do that sweet rails thing:
adapter: oracle_enhanced
database: orcl # or, host:
username: scott
password: tiger
rails mhtest- hooray, it works
cd mhtest
ruby script/generate scaffold comic title:string issue:integer publisher:string
rake db:migrate
ruby script/server
http://localhost:3000/comics- references:
http://emphaticsolutions.com/2008/05/22/connecting-to-oracle-from-ruby-on-rails.html
http://www.oracle.com/technology/pub/articles/saternos-ror-faq.html
http://drawohara.com/post/37166893/rails-unsucking-oci-oracle-on-rails-2-1
http://www.oracle.com/technology/pub/articles/haefel-oracle-ruby.html