Created
May 16, 2012 00:27
-
-
Save leesmith/2706272 to your computer and use it in GitHub Desktop.
Ruby on Rails development setup on Ubuntu 12.04 (vim, git, rbenv)
This file contains hidden or 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
# system update | |
sudo apt-get update | |
# install vim | |
sudo apt-get install vim | |
# Generate SSH keys | |
ssh-keygen -t rsa -C "[email protected]" | |
# add key to github then test it out | |
ssh -T [email protected] | |
# install git and gitg | |
sudo apt-get install git-core gitg | |
# set global git identity | |
git config --global user.name "John Doe" | |
git config --global user.email [email protected] | |
# set default text editor for git | |
git config --global core.editor vim | |
# set git status colors | |
git config --global color.diff auto | |
git config --global color.status auto | |
git config --global color.branch auto | |
git config --global color.status.changed yellow | |
git config --global color.status.added green | |
git config --global color.status.untracked red | |
# verify git settings | |
git config --list | |
# install rbenv | |
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile | |
echo 'eval "$(rbenv init -)"' >> ~/.profile | |
# install ruby-build | |
mkdir ~/.rbenv/plugins | |
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
# install compiler and common libraries | |
sudo apt-get install build-essential libreadline-dev libssl-dev zlib1g-dev libxml2-dev libxslt-dev | |
# install some rubies | |
rbenv install 1.9.2-p320 | |
rbenv install 1.9.3-p194 | |
rbenv rehash | |
# set a global ruby | |
rbenv global 1.9.2-p320 | |
# Turn off rdoc generation when installing/updating gems | |
echo "install: --no-ri --no-rdoc" >> ~/.gemrc | |
echo "update: --no-ri --no-rdoc" >> ~/.gemrc | |
# install rbenv-bundler | |
git clone git://github.com/carsomyr/rbenv-bundler.git ~/.rbenv/plugins/bundler | |
gem install bundler | |
rbenv rehash | |
# install javascript runtime | |
sudo apt-get install nodejs | |
# set global bundler config | |
bundle config path vendor/bundle | |
bundle config disable_shared_gems | |
# databases | |
sudo apt-get install postgresql libpq-dev | |
sudo -u postgres createuser --superuser lsmith -w | |
sudo apt-get install mysql-server mysql-client libmysqlclient-dev | |
sudo apt-get install sqlite3 libsqlite3-dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would also be nice to have Vim compiled with Ruby support :)