devsecops / bootcamp

A open contribute bootcamp to develop DevSecOps skills...
Apache License 2.0
711 stars 353 forks source link

Getting "ruby: command not found" or "aws: command not found" #85

Closed pbnj closed 8 years ago

pbnj commented 8 years ago

SYMPTOM/ISSUE

When I'm in the virtual machine and I try to run ruby -v or gem install rails or aws configure, I keep getting errors: ruby: command not found or gem: command not found or aws: command not found.

DESCRIPTION

When Vagrant is initializing the virtual machine for the first time, Vagrant first downloads a minimalist OS (in this case, CentOS 7) with essentially nothing on it but the core OS itself, then runs the scripts that are defined in the Vagrantfile, such as the BASIC_SETUP, RUBY_SETUP, and AWS_SETUP.

For some reason (potentially network latency issues), some scripts fail to run in a timely fashion (aka timeout) or fail to run at all.

SOLUTION

In your local machine terminal (if you're SSHed into the virtual machine, exit out of it), then run:

vagrant provision && vagrant ssh

This will re-run the provisioning scripts again and will SSH into the virtual machine once complete. At this point, verify that ruby and/or aws have been installed by running:

ruby -v
aws configure

If you still get command not found error or any other errors, please open an issue with your details.