Skip to content

Instantly share code, notes, and snippets.

@leesmith
Created May 16, 2012 00:27
Show Gist options
  • Save leesmith/2706272 to your computer and use it in GitHub Desktop.
Save leesmith/2706272 to your computer and use it in GitHub Desktop.
Ruby on Rails development setup on Ubuntu 12.04 (vim, git, rbenv)
# 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
@silvenon
Copy link

It would also be nice to have Vim compiled with Ruby support :)

@olistik
Copy link

olistik commented Jun 12, 2013

is this a fork of https://gist.github.com/olistik/2627011 ? ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment