Skip to content

Instantly share code, notes, and snippets.

@srpouyet
Forked from jasoncodes/gist:1223731
Created November 1, 2012 13:52
Show Gist options
  • Save srpouyet/3993736 to your computer and use it in GitHub Desktop.
Save srpouyet/3993736 to your computer and use it in GitHub Desktop.
Installing Ruby 1.9.3 with rbenv
# ~/.bash_login
export PATH="/usr/local/bin:$PATH"
# ~/.bash_profile
# Load .bashrc
. ~/.bashrc
# ~/.bashrc
# Change prompt
# PS1='\h:\W \u\$ '
PS1='\u@\h:\W \$ '
PATH=/usr/local/bin:${PATH}
# Tell ls to be colourful
export CLICOLOR=1
# Tell grep to highlight matches
export GREP_OPTIONS='--color=auto'
# Sublime is default editor
export EDITOR='subl -w'
# rbenv
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
# Add npm modules path to Node.js
export NODE_PATH="/usr/local/lib/node"
# colorize traceroute etc
source "`brew --prefix grc`/etc/grc.bashrc"
# Git completion
source "`brew --prefix `/etc/bash_completion.d/git-completion.bash"
# Ruby completion
# source `brew --prefix`/etc/bash_completion.d/completion-ruby
# source `brew --prefix`/etc/bash_completion.d/completion-rails
# source `brew --prefix`/etc/bash_completion.d/completion-bundle
# source `brew --prefix`/etc/bash_completion.d/completion-gem
# source `brew --prefix`/etc/bash_completion.d/completion-rake
# Enable bash completion
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
# Aliases
alias g='git'
alias r='rails'
alias ra='rake'
alias b="bundle"
alias migrate="rake db:migrate"
alias rollback="rake db:rollback"
alias p='passenger'
alias pasta='passenger start'
eval "$(hub alias -s)"
# Autocomplete for 'g' as well
complete -o default -o nospace -F _git g
# Autocomplete for 'r' as well
complete -o default -o nospace -F _rails r
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
#~/.gemrc
gem: --no-ri --no-rdoc
brew install rbenv
brew install ruby-build
brew install rbenv-vars
brew install readline
brew install ctags
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.bash_profile
exec $SHELL -i # reload the shell
CONFIGURE_OPTS="--disable-install-doc --with-readline-dir=$(brew --prefix readline)" rbenv install 1.9.3-p194
rbenv global 1.9.3-p194
# handy gems for development
gem install bundler rbenv-rehash git-up cheat jazz_hands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment