-
Notifications
You must be signed in to change notification settings - Fork 0
Setting Up Your Ruby Environment
In this tutorial we will set up a working Ruby environment. If you are using OS X or Linux, it is likely that you already have Ruby installed. Using this Ruby may be fine, but in this tutorial we will be using RVM to manage Ruby so we can have more control.
See Installing RVM for more info.
First, install the public key for RVM.
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
Note: you may need to use gpg2 instead of gpg.
Next, install the stable version of RVM.
\curl -sSL https://get.rvm.io | bash -s stable
Note: Depending on your setup, the RVM install script may tell you to source .profile of something similar. If that is the case you would run a command like this: source ~/.profile.
Now you should have a working install of RVM. To test this run
rvm help
And you should see a long help document.
Now that we have RVM installed, we need to install Ruby. With RVM this is easy!
This command will install Ruby v2.3.
rvm install 2.3
After this command completes, check that everything worked. Type
rvm current
and you should see
ruby-2.3.0
There is much more to managing Ruby with RVM. I encourage you to take a look at the RVM basics guide for more information.