Tip:
Highlight text to annotate it
X
What's going on everyone welcome to this third tutorial on setting up our rails environment.
My name is Jack Jenkins and this is Academy of One. Today we are going to talk about two
text editors and then we are going to learn about some terminal commands. Alright, so
the text editor I recommend for using for ruby on rails is going to be sublime text.
Now sublime text is a really good editor because It has a lot of supporting plug-ins for rails.
However, it is seventy dollars. I recommend it but if you don't want to spend seventy
dollars you'll do fine with gedit. Which is the text editor Linux comes with. I mean ubuntu
comes with. Sorry. Go ahead and click the terminal window. Let's start by learning some
terminal commands. So lets start off by creating a new file. There are two ways to do this,
however one is a good way the other is not a good way. The not so good way is using the
touch command. Touch Mario. That sounds really dirty. ls, which stands for list. Which will
list out the current directory. And you can see we just created a new Mario folder [I
mean file]. However, that's bad because now I have to do gedit Mario, and, of course you
can replace gedit with subl or vi or whatever text editor you're using. And yeah, that took
two steps. The way I do it is using gedit and then the name of the folder [IT'S A FILE!!]
which will be Sal. And of course you close it. But you have to save it first. Im not
going to save because [???] delete it latter. Lets actually open up Mario again. Lets put
in "MAMA MEA". Again spelling badly is my thing [anything badly is my thing]. And lets
say we're gonna have Luigi who says the same thing as Mario. Well we can have the same
folders [FILE!], well we can copy the same folders [FILE *** IT!!] with cp. Why do
I keep saying folder [Cause you're stupid?] I mean file [dumb dumb] jeez. We can cp the
same file with mario and the name of the new file we want to have, "luigi". ls, and now
we have mario, mario and luigi. Lets go ahead and rm, which stands for remove, mario and
mario~. ls. And luigi. Lets say I forgot what's inside luigi? Well I can open up gedit. Not
sure why I clicked gedit by itself [Not sure you "clicked" anything]. Gedit luigi. And
it says mama mea. By the way, you can cycle through your commands with the up and down
arrow keys. But um... Lets say you just want to see what's inside luigi without gedit.
The easiest way to do it is with the cat command and then the name of the file you want to
have spit out. In this case I'll spit out "Mama mea". Alright, so that's it for files,
now im gonna be talking about folders and by folders I mean directories. As they are
usually called. So lets start with mkdir which stands for make directory. And we are going
to make a directory named mario. ls. And go ahead and rm luigi. and go ahead and click
[you mean type?] clear. And by click I mean type clear [there you go]. To clear out the
terminal. cause it will get cludderd alot when you're doing rails. It's nice to have
it clean. So lets go ahead and cd, or change directory, into the mario folder. And lets
go ahead and make another directory. Then go make "lugi". cd "lugi". I spelled that
wrong again. So if you want to go back you do "cd .." for previous folder. And of course
you can do this multiple times cd "../..". To go back to the home folder. And lets go ahead
and remove mario. And... oh! You cannot remove mario? Is a directory? what are we supposed
to do? Don't worry, you can remove directories by passing in the "-r" tag, which stands for
recursive. And now there's no mario. Well that's it for today. Tommorow we are going
to talk about sudo and chmod, so that will be fun and pretty soon we will start with
rvm. So have a nice day guys.