I am under the impression that if youare using the shell provisioner all that magic will happen under root user
can you put some dummy things like id pwd echo $HOME to be sure path/user? On Fri, May 23, 2014 at 8:27 AM, Alberto Negron <[email protected]>wrote: > Hello Everyone, > > I have shell script that I use when I vagrant-up an Ubuntu precise64 box - > The script runs updates and also install packages required for rbenv, ruby > and rails - The script seems to run fine but when I ssh into the box I > cannot find the rbenv git. repo nor a custom .bash_profile I created > during provision. > > This is an extract from my script that is somehow missing in action: > > git clone https://github.com/sstephenson/rbenv.git ~/.rbenv > touch ~/.bash_profile > echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile > echo 'eval "$(rbenv init -)"' >> ~/.bash_profile > source ~/.bash_profile > > and when I ssh and check my vagrant home directory there is no repo nor > .bash_profile :-s. > > vagrant@precise64:~$ ls -a > > . .bash_history .cache .profile .sudo_as_admin_successful > .veewee_version > > .. .bash_logout .bashrc postinstall.sh .ssh .vbox_version > > I'd have expected to see ~/.rbenv and ~/.bash_profile > > vagrant@precise64:~$ which rbenv > > vagrant@precise64:~$ source ~/.bash_profile > > The program 'rbenv' is currently not installed. You can install it by > typing: > > sudo apt-get install rbenv > > The above error is clearly because it can find the ~/.rbenv folder. > > *How do I know that my scripts run ok?* > > Well apart from no apparent errors here there are last few lines where > anyone can see that rails has been installed > > ==> default: Installing ri documentation for tzinfo-1.1.0 > > ==> default: Done installing documentation for actionmailer, actionpack, > actionview, activemodel, activerecord, activesupport, arel, builder, > erubis, hike, i18n, mail, mime-types, minitest, multi_json, polyglot, rack, > rack-test, rails, railties, sprockets, sprockets-rails, thor, thread_safe, > tilt, treetop, tzinfo after 420 seconds > > ==> default: 27 gems installed > > I've done it manually before and it works like a charm but I'd like to do > it automatically. > > Any ideas? what am I missing? > > Many thanks in advance! > > -- > You received this message because you are subscribed to the Google Groups > "Vagrant" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
