devsecops / bootcamp

A open contribute bootcamp to develop DevSecOps skills...

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

pbnj opened this issue · comments

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.