Skip to content

Instantly share code, notes, and snippets.

@pythonicrubyist
Last active August 29, 2015 14:01
Show Gist options
  • Save pythonicrubyist/0b061d3ae2ed6028b360 to your computer and use it in GitHub Desktop.
Save pythonicrubyist/0b061d3ae2ed6028b360 to your computer and use it in GitHub Desktop.
Ruby Development Environment Setup on OS X Mavericks
# Instlled Xcode, Github and Sublime Text 3 by runing their installation packages.
git config --global user.name "Your Full Name"
git config --global user.email "Your Email Address"
# Homebrew Installation:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew doctor
echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile
# RVM Installation:
echo "gem: --no-document" >> ~/.gemrc
\curl -sSL https://get.rvm.io | bash -s stable --autolibs=enable
echo source ~/.profile >> ~/.bash_profile
# Oracle Client Installation
# Download Oracle basic client, SQLplus and SDK packages for Mac OSX 64bit from the follwoing link:
http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html
cd ~/Downloads
unzip -qq instantclient-basic-macos.x64-11.2.0.4.0.zip
unzip -qq instantclient-sqlplus-macos.x64-11.2.0.4.0.zip
unzip -qq instantclient-sdk-macos.x64-11.2.0.4.0.zip
cd instantclient_11_2
mkdir -p /usr/local/oracle/product/instantclient_64/11.2.0.4.0/bin
mkdir -p /usr/local/oracle/product/instantclient_64/11.2.0.4.0/lib
mkdir -p /usr/local/oracle/product/instantclient_64/11.2.0.4.0/jdbc/lib
mkdir -p /usr/local/oracle/product/instantclient_64/11.2.0.4.0/rdbms/jlib
mkdir -p /usr/local/oracle/product/instantclient_64/11.2.0.4.0/sqlplus/admin
mv ojdbc* /usr/local/oracle/product/instantclient_64/11.2.0.4.0/jdbc/lib/
mv x*.jar /usr/local/oracle/product/instantclient_64/11.2.0.4.0/rdbms/jlib/
# rename glogin.sql to login.sql
mv glogin.sql /usr/local/oracle/product/instantclient_64/11.2.0.4.0/sqlplus/admin/login.sql
# Move lib & sdk
mv *dylib* /usr/local/oracle/product/instantclient_64/11.2.0.4.0/lib/
mv sdk /usr/local/oracle/product/instantclient_64/11.2.0.4.0/lib/sdk
mv *README /usr/local/oracle/product/instantclient_64/11.2.0.4.0/
mv * /usr/local/oracle/product/instantclient_64/11.2.0.4.0/bin/
touch ~/.oracle_client
echo export ORACLE_BASE=/usr/local/oracle >> ~/.oracle_client
echo export ORACLE_HOME=$ORACLE_BASE/product/instantclient_64/11.2.0.4.0 >> ~/.oracle_client
echo export PATH=$ORACLE_HOME/bin:$PATH >> ~/.oracle_client
echo export DYLD_LIBRARY_PATH=$ORACLE_HOME/lib:$DYLD_LIBRARY_PATH >> ~/.oracle_client
echo export TNS_ADMIN=$ORACLE_BASE/admin/network >> ~/.oracle_client
echo export SQLPATH=$ORACLE_HOME/sqlplus/admin >> ~/.oracle_client
echo "source ~/.oracle_client" >> ~/.bash_profile
source ~/.bash_profile
cd /usr/local/oracle/product/instantclient_64/11.2.0.4.0/lib
ln -s libclntsh.dylib.11.1 libclntsh.dylib
ln -s libocci.dylib.11.1 libocci.dylib
gem install ruby-oci8
# MySQL Installation:
brew install mysql
mysql.server start
mysql -uroot
mysql.server stop
gem install mysql2
# Java Installation:
http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment