

$ if sudo grep -q secure_path /etc/sudoers then sudo sh -c "echo export rvmsudo_secure_path=1 > /etc/profile.d/rvm_secure_path.sh" & echo Environment variable installed fi The following command tries to autodetect whether it is necessary to install rvmsudo_secure_path=1, and only installs the environment variable if it is the code. secure_path is set on most Linux systems, but not on macOS. On systems where sudo is configured with secure_path, the shell environment needs to be modified to set rvmsudo_secure_path=1.

You may need to use gpg2 instead of gpg on some systems. Run the following commands on your production server to install RVM: $ sudo gpg -keyserver hkp:// -recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 Sudo yum install -y curl gpg gcc gcc-c++ make Red Hat, CentOS, Fedora, Amazon Linux, Scientific Linux Sudo apt-get install -y curl gnupg build-essential Curl and gpg are needed for further installation steps, while the compiler toolchain is needed for installing common Ruby gems. Ensure that curl and gpg are installed, as well as a compiler toolchain.
