How to enable RVM

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 option 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 private server running Ubuntu in order to enable RVM in the DreamHost panel.

Enabling RVM in the Panel

To enable RVM:

  1. Visit the RVM article for instructions on how to manually install Ruby Version Manager.
  2. Using RVM, install any custom version of Ruby you like under your Shell user.
  3. Navigate to the (Panel > 'Domains' > 'Manage Domains') page.
  4. Click the Edit button to the right of your domain under the 'Web Hosting' column.
    The 'Manage Domains' settings page opens:
    01 RVM nodejs.fw.png
  5. Scroll down to the 'Web Options' section and check the 'Passenger (Ruby/NodeJS/Python apps only):' check box.
    The RVM check box appears along with a field to enter your custom path:
    02 RVM nodejs.fw.png
  6. Enter the following:
    • Check the 'RVM:' check box.
    • Enter the path for your Ruby install and save your changes.

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:

/home/username/.rvm/wrappers/ruby-2.2.2/ruby

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:

  • /home/username/.rvm/wrappers/ruby-2.2.1@firstsite/ruby
  • /home/username/.rvm/wrappers/ruby-2.2.1@secondsite/ruby

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
  • /home/username/.rvm/wrappers/firstsite/ruby
  • /home/username/.rvm/wrappers/secondsite/ruby

After you have saved changes, this specific domain will use your custom version of Ruby along with Passenger.

See also

Internal links

External links

Did this article answer your questions?

Article last updated .