Skip to content

Instantly share code, notes, and snippets.

@mathias
Created May 4, 2013 14:40
Show Gist options
  • Save mathias/5517685 to your computer and use it in GitHub Desktop.
Save mathias/5517685 to your computer and use it in GitHub Desktop.
Some notes from setting up a Vagrant for a Rails project:

Ubuntu precise64 box:

# Necessary software:
sudo apt-get install curl tmux vim

# Install RVM:
curl -L https://get.rvm.io | bash -s stable --autolibs=enabled
source /home/vagrant/.rvm/scripts/rvm

# set up dotfiles:
cd ~
git clone git@github.com:mathias/dotfiles.git

vim dotfiles/bash/.bashrc
# Remove line that requires .bashrc.local since we'll be using the ubuntu .bashrc and calling this file .bashrc.local

vim .bashrc
# Find '.bash_aliases', add a similar line to load ~/.bashrc.local

# link dotfiles:
ln -s dotfiles/bash/.bashrc .bashrc.local
ln -s dotfiles/bash/.bashrc.alias .bashrc.alias
# ln -s dotfiles/bash/.bashrc.completion .bashrc.completion => Turns out completion isn't needed since ubuntu already does it
ln -s dotfiles/bash/.bashrc.prompt .bashrc.prompt

ln -s dotfiles/emacs/.emacs .emacs
ln -s dotfiles/git/.gitconfig .gitconfig
ln -s dotfiles/tmux/.tmux.conf .tmux.conf
ln -s dotfiles/vim/.vimrc .vimrc

git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
vim
# run :BundleInstall in vim

# Source bashrc again:
. ~/.bashrc

# Should now have colors, etc.

# Get ag (replacement for ack), per https://github.com/ggreer/the_silver_searcher
sudo apt-get install -y automake pkg-config libpcre3-dev zlib1g-dev liblzma-dev

cd ~
git clone https://github.com/ggreer/the_silver_searcher.git
cd the_silver_searcher
./build.sh
sudo make install

# setting up Rails project:
cd ~
ln -s /vagrant ${project_name}
cd ${project_name}
rvm install ruby-1.9.3-p392
cd .
bundle

More instructions later...

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