Baby steps: setting a development environment in Linux — Part 1
“Some people have told me they don’t think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100 mph. They’d be a lot more careful about what they say if they had.” — Linus Torvalds
It’s been a few weeks since I graduated from Makers Academy’s remote boot camp…Although I was meaning to chronicle every step I took I never had the time, mainly because I suck at time management. Anyway, here I'm finally with enough time to share my experience, hoping to pick-up up what I might have missed and potentially help future Makers in the process.
Setting up a Dev-Env on Linux:
I have elected to use Linux for this boot camp, I confess, I'm kind of biased towards Linux but I won’t judge you if you choose to buy a used Macbook as a safer/more familiar option, but if you’re on a tight budget and don’t own a Mac already consider Linux as a very viable -and better :P - option (I've completed the whole course using a Linux machine)…In the following part of this article I’ll assume that you have a Linux machine ready, if you don’t don’t despair, I’ve got your back, bud! here’s a video tutorial on how to install Linux mint (one of the best Linux distros out there and my personal favourite).
RVM stands for Ruby version manager, it allows you to install more than one version of Ruby on your machine and switch between them… it’s awesome!
Open your terminal Ctrl+Alt+T and run the following commands (without the $ sign…I’ll be using the dollar sign to indicate a command line prompt):
We’ll first install cURL (a command line tool for transferring Data):
$ sudo apt-get install curl
Enter your password and hit
Now we can use cURLto import RVM public keys:
$ gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
$ curl -sSL https://get.rvm.io | bash -s stable
And now we need to source RVM in out current shell:
$ source /etc/profile.d/rvm.sh
..and we’re done with setting RVM, now to setup Ruby’s dependencies (using RVM):
$ rvm requirements
Wait until RVM do its thing and then you can list available ruby versions to install:
$ rvm list known
You’ll get something like this:
# MRI Rubies
[ruby-]1.8.7[-head] # security released on head
Let’s install the latest version available (2.3.1 at the time of writing):
$ rvm install 2.3.1
This will take a while, let RVM do its thing and go make yourself some tea!
When you come back don’t forget to set your default Ruby version (don’t worry you can always change that, that’s the point of RVM anyway):
$ rvm use 2.3.1 --default
Congrats! now you have Ruby binaries installed using RVM.
To check if everything went right (or in case you forgot what version of ruby you have) run:
$ ruby --version
You should get something like this:
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
That’s it..see you in part 2!