Installing Ruby / Installing via comm& line for Linux & Mac OS X
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.
Learn More
Subtitles of the Movie
In this video we're going to look at how to install Ruby from SourceCode. This is applicable to Linux systems as well as Mac OS X systems. The notes for this will be in a file that should accompany the DVD that you purchased, and it should also be available on the Website ah, if you're using the on-line resources of VTC. One caveat on Mac OS X, in order to compile this from SourceCode, you're going to need the read library, ah, a quick search on Google for Gnu read line will pull up the Gnu read line library, you click into there, it takes you to this page, you scroll down here to availability, you're going to find the file here, it's a Tar G Zip file, and you'll use the same procedures that we used to do Ruby here, and that will be in notes that accompany this as well. So, back to Ruby. Now, this happens to be a Fedora system, so ah, Fedora Core 7, so if I go in here, type Ruby, nothing installed; IRB, nothing installed. So it's obvious we have to install it. So the first thing to do is download it. Now I've already taken the liberty of downloading it, so it should be in my directory here, oh, actually I think it's on my desktop. There it is. I didn't want to bore you with the details of downloading it. There it is. So I've already downloaded it. You can download either version, the G-zip, or the BZ2, ah, there's just different compression formats. Once you've downloaded it, you'll put the file in someplace you can work with it. I have it in my home directory here. So the first thing we're going to issue is a Tar command to actually uncompress it and untar it, and the tar command is xzvf, which the x is extract, the z is saying, hey, it's compressed, so lets uncompress it; v is for verbose, and then f is the file, and then here's the file name. And if you haven't seen that before, I'm using Tab Completion, so I can type in part of a file name and then Linux will run off and get the rest of it. So I'm going to hit this and a bunch of stuff is going to scroll up the screen as it untars the files out of, out of this file. All right. Now if I do an LS, you'll see that I now have a Ruby directory right here, so I'm going CD into there and let's take a look at what's in here. The first thing that I recommend that you do is take a look at the read-me file. It's located right here. Ah, these types of packages usually have either a read-me or install. So you can go ahead through this. It will tell you exactly what you got here, how to get updates generally, and the thing that we're really interested in: it's going to say how to compile in install. So it gives us the specific steps here. If you want it in writing you can see it here. The same notes also accompany the video. But I'm ready to just walk you through here. The first thing that we're going to issue, and again, this works with that ah, read-line library that you have to install in Mac OS X. So, I'm in the directory of those compressed files. Let me show you here. So I'm in home, my home directory, and then the directory that when I untarred that file it created, and here's all of our files. So the first command I'm going to issue is configure. And what this is going to do is actually create my Make File, so that I can use Make File to actually build the system. And this is going to take a little bit to do, so bear with me here. All right, now we're done configuring, and now we have a Make File. If I do an LS, you're going to see now that I've got a Make File here. We could take a look at that. It's really not going to mean a whole lot unless you're a programmer and you understand, but it's essentially set up a file that we can use to build Ruby on our system. And that's exactly what our next step is. And we go ahead and complete that by typing in Make. Now this takes quite a long time, so we'll probably edit the video and delete this boring stuff here. Okay. We've successfully compiled our Ruby and we can look right down in here and we have no errors coming through there. If I actually want to take a look, and take a look, here's my Ruby binary that was created and if I go into that directory there, you'll see that I actually have an IRB that was created also. So the next step is pretty easy. We've got to do, to do, make, actually I've got to do an SU on this system. I haven't set it up to let me do pseudo yet, so then we'll do a Make Install. Now the reason you have to be root super user is because it actually installs things in your library and also your main bin directory and the only user that has permissions to write in there if your system is pretty generic like this one is root. So that's why you'll have to be doing the install as root. So there we go. It installed. It's a very quick little script to install those things. So now if I type Ruby and do a version, there we go, 1.8.6. If I do IRB, there's my interactive Ruby, so I'm all set. So that's how we essentially install Ruby via SourceCode on Linux and Mac OS X.
Tutorial Information
| Course: | Programming With Ruby |
| Author: | Al Anderson |
| SKU: | 33788 |
| ISBN: | 1-934743-01-1 |
| Release Date: | 2007-08-21 |
| Duration: | 8.5 hrs / 113 lessons |
| Work Files: |
Yes |
| Captions: | For Online University members only |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 