In this lesson, our instructor talks about setting up your environment. He discuses installing Ruby, window installation, Mac OSC and Linux installation. Then he talks about setting up Debian, installing homebrew, ruby version manager, and installing RVM with Ruby. Finally, he lectures on OSX-GCC installer, Ruby 1.9.3, testing out your Ruby and setting it as default.
Ruby is an interpreted language, scripting language, and also suitable for procedural and functional programming.
Every value in ruby is an object.
Setting Up Your Environment
Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.
Welcome back to educator.com. Today's lesson is on setting up your environment.0000
The goal of this lesson is to get your environment set up so you are using the same Ruby version as us, and you have everything in sync, so you have the same tools I'm using.0006
The first thing we are going to look at is ruby-lang.org.0025
This has the core Ruby code--source code--and we are going to be using 1.9.3 for all of our lessons.0032
If you are on a Mac, you might see 1.8.7 set up by default, but you should go through the steps in this lesson to get you set up with 1.9.3 so you don't see any issues as you are developing.0049
First, let's go to that website, ruby-lang.org, and check it out.0066
If you go here, at ruby-lang.org, you will notice that it has a lot of documentation information, about it.0071
It will give you a little gist of what Ruby is, and it will show you some code for a class.0085
What they do here, is they give you a lot of versions... from latest to oldest. 0096
So you will see that it says "1.9.3-p27 is released."0101
That's the latest one. And you can go here and see the change log, and see what bugs have been fixed. 0107
Go ahead and click the change log; you will see that they give you a whole list of things that have been fixed for this version.0119
You can go ahead and check it out if you want, but I think mostly you just want to get the most stable one, so I'll show you how to do that.0126
The main thing here...you see all this news...the main thing here is this "Download Ruby" button.0134
So, you click "Download Ruby," and it will tell you that the stable version is 1.9.3, and it will tell you three ways of installing Ruby.0144
Going through these ways: one is compiling it from source, another is using a third-party tool to install Ruby--and we are going to go through each of these-- and using a package management system.0156
So after you do that, let's go to my .bash profile.0928
I've already added that line, so if I go to relative path, and just do run-profile, and I press Return--this is where you would paste that command from that slide-- and all this does it to get RVM set up on your machine.0934
It runs source, so make sure it's loaded up on that terminal.0955
Then, you can go ahead and run RVM. You will see a lot of usage information there, and a lot of different things you can do with RVM here.0960
Now that we have RVM set up, we have Brew installed, and now we need to set up this OS X GCC installer.0980
This, again, is something we need for Ruby 1.9.3.0990
So you need to go to this link, and you just download the file there. Double-click; install it to your Mac OS machine.0994