Are you looking to deploy your app to production with Passenger, maybe in combination with Nginx or Apache? Take Quickstart: Ruby + Phusion Passenger This 5 minute tutorial teaches you to start your application in a Phusion Passenger server, in development mode. Quickstart: Ruby + Phusion Passenger Quickstart: Ruby + Phusion Passenger
RVM MANAGE MULTIPLE RUBY VERSIONS INSTALL
Next stepĬongratulations, you have installed Ruby on your production server! Continue: Install Passenger »
Visit the RVM website to learn more about rvmsudo. However, sudo nukes all environment variables for security reasons, which intereferes with RVM. This is because RVM works by manipulating environment variables. One thing you should be aware of when using RVM, is that you should use rvmsudo instead of sudo when executing Ruby-related commands. Please install Node.js from Heads-up: sudo vs rvmsudo
Sudo yum install -y -enablerepo=epel nodejs npm Sudo apt-get install -y nodejs build-essential Sudo apt-get install -y apt-transport-https ca-certificates & Run the following commands to install Node.js from the NodeSource APT repository. Sudo ln -sf /usr/bin/nodejs /usr/local/bin/node If you do not use Rails then you can skip to the next step. This is because Rails's asset pipeline compiler requires a Javascript runtime. If you are using Rails, then you must install Node.js. We will use Bundler in this tutorial, so let us install it: $ gem install bundler -no-rdoc -no-ri Optional: install Node.js if you're using Rails Install Bundlerīundler is a popular tool for managing application gem dependencies. Replace X.X.X with the Ruby version you want.
To install a specific version of Ruby, run: $ rvm install ruby- X.X.X $ rvm -default use ruby- X.X.X To install the latest version of Ruby, run: $ rvm install ruby However, if you are deploying your own app, then your app may have a specific Ruby version requirement. If you are deploying the example app from the quickstart, then that example application works with all Ruby versions. Usually, installing the latest Ruby version will suffice. Also if you use gnu screen or another terminal multiplexer, RVM also won't work you must use a plain ssh session. This is important: if you don't relogin, RVM doesn't work. When you are done with all this, relogin to your server to activate RVM. $ 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.