ga-wdi-boston / orientation

Instructions for students beginning General Assembly's WDI program in Boston
Other
11 stars 198 forks source link

Add directions for rbenv script #267

Open danman01 opened 7 years ago

danman01 commented 7 years ago

After the linking with Github and Hub section, add:

Ruby and Rbenv

run ./config/rbenv.sh

Note that we don't do any Rails pre-installing or anything so we might should not included Rails in the title, however this does prepare us for working with Rails.

Also Rbenv install proved tricky What we got working was placing these Rbenv PATH and init lines in ~/.bash_profile and NOT in ~/.bashrc:

~/.bash_profile looks like this:

test -f ~/.bashrc && source ~/.bashrc

# RBenv paths that we don't seem to need:
# export PATH="$HOME/.rbenv/shims:$PATH"
export PATH="$HOME/.rbenv/bin:$PATH"

export PATH="/usr/local/sbin:$PATH"
export PATH="/usr/local/bin:$PATH"

# Make sure this is at the end of this file:
if which rbenv > /dev/null; then
 eval "$(rbenv init -)"
fi

~/.bashrc looks like this:

function parse_git_branch {
  ref=$(git symbolic-ref HEAD 2> /dev/null) || return
  echo "("${ref#refs/heads/}")"
}
export PS1="\w \$(parse_git_branch)\n\$ "
export EDITOR='atom --wait'
export VISUAL='atom --wait'

export NVM_DIR=~/.nvm
. $(brew --prefix nvm)/nvm.sh

eval "$(hub alias -s)"