You need to give the full path to the file.
E.g.
echo "source /usr/local/share/chruby/chruby.sh" >> /home/vagrant/.bashrc
Add these lines to .bashrc
if [ -f /usr/local/share/chruby/chruby.sh ]; then . /usr/local/share/chruby/chruby.shfi
It will textually include the script into .bashrc and execute it when opening a new shell.
Try this for your last 2 lines - it should give you exactly what you need.
echo "source /usr/local/share/chruby/chruby.sh" >> /home/vagrant/.bashrcecho "source /usr/local/share/chruby/auto.sh" >> /home/vagrant/.bashrc