Skip to content

Instantly share code, notes, and snippets.

@wickedwukong
Last active September 29, 2015 12:27
Show Gist options
  • Save wickedwukong/1601000 to your computer and use it in GitHub Desktop.
Save wickedwukong/1601000 to your computer and use it in GitHub Desktop.
setup proxy on windows to download ruby gems And connect to a DB in Ruby irb.
set up proxy
set HTTP_PROXY=http://username:fakepassword@proxy-hostname.com:port-number
Gem installs:
gem install ruby-dbi
gem install ruby-oci8
gem install activerecord
connect to DB
1. invoke irb
2. require 'dbi'
3. require 'oci8'
4. db = OCI8.new('your_db_username', 'fakepassword', 'oracle-host.com:port-number/db-name')
5. example: db.exec('select sysdate from dual') do |r| p r end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment