Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
RVM cd broken on a directory with only a Gemfile
set -e
source "$HOME/.rvm/scripts/rvm" #so 'cd' will change gemset when dotfiles present
rm -rf ~/tmp/dir_with_gemfile
mkdir -p ~/tmp/dir_with_gemfile
echo "source ''" > ~/tmp/dir_with_gemfile/Gemfile
echo "gem 'rails'" >> ~/tmp/dir_with_gemfile/Gemfile
#end setup
echo 'pre cd ~'
cd ~
echo 'post cd ~'
#exits after "cd"
echo 'pre cd ~/tmp/dir_with_gemfile'
cd ~/tmp/dir_with_gemfile
echo 'post cd ~/tmp/dir_with_gemfile'
pre cd ~
post cd ~
pre cd ~/tmp/dir_with_gemfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.