Last active
September 29, 2015 12:27
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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