If your Ruby application won't start because of a missing gem, then you must install it locally using Bundler. For more information about using Bundler, please visit the following page:
Ruby Version Manager (RVM) is a utility that allows you to add your own personal version of Ruby to a user. It allows you to add, remove, or have multiple versions of Ruby and its libraries to live in your user directory.
This article describes how to enable the RVM with Passenger using the DreamHost panel.
Please note this does NOT install RVM. You must still manually install this yourself. Visit the RVM article for detailed instructions on how to manually install. Once RVM has been installed and you've installed a custom version of Ruby, you can then select which version of Ruby you'd like to use (for a specific domain) by enabling the option in the panel below.
Your domain must run on a VPS or Dedicated Server in order to enable RVM in the DreamHost panel. If your VPS is running Nginx, view the following article instead.
Enabling RVM in the Panel
To enable RVM:
- Visit the RVM article for instructions on how to manually install Ruby Version Manager.
- Using RVM, install any custom version of Ruby you like under your Shell user.
- Navigate to the Hosted Domains page.
- Click the Edit button to the right of your domain under the Web Hosting column.
- The Hosted Domains settings page opens:
- Scroll down to the Web Options section and check the Passenger (Ruby/NodeJS/Python apps only): check box.
- A Passenger prompt appears notifying you that a /public directory will be added to the end of your web directory path. Click OK to continue.
If you already have a /public directory in the current Web directory, clicking OK will only switch the Web directory to this new /public folder. Nothing in it is removed.
If you do not already have a /public directory, the panel creates it for you with a coming soon page. The files in your current Web directory remain untouched.
- The RVM check box appears along with a field to enter your custom path:
- Enter the following:
- Check the 'RVM:' check box.
- Enter the path for your Ruby install and save your changes.
Make sure to change username to your Shell user.
The path may not appear exactly as it does in the panel. For example, once you have manually installed a version of Ruby, it could also appear in the following directory:
Make sure to confirm where your custom version of Ruby has been installed to before saving your changes above.
You can set up multiple domains/subdomains on a single user via Gemsets, but you will need to create aliases without the '@' character.
So, if the following paths give an invalid characters message:
Run the following commands to create an alias. (Adjust 'firstsite' and 'secondsite' as necessary):
[server]$ rvm alias create firstsite ruby-2.2.1@firstsite [server]$ rvm alias create secondsite ruby-2.2.1@secondsite
After you have saved changes, this specific domain will use your custom version of Ruby along with Passenger.