Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Introduction to Ruby on Rails 7!
You have completed Introduction to Ruby on Rails 7!
Preview
In this lesson, you’ll set up the foundation for Rails development. We’ll walk you step by step through installing Ruby, Rails, and all required tools on your local machine—then verify everything works like a charm.
Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
Okay, so the first thing that we have
to do to get started is to install Ruby
0:00
on Rails.
0:03
There are a few dependencies
that we have to install first.
0:04
The first one is called Node JS.
0:06
All we have to do is go to nodejs.org
then we just have to download.
0:08
I'm gonna download from Windows because
that's the operating system that I'm on.
0:14
Click on LTS because LTS is the one
that stands for Long Term Support.
0:18
So once it's installed, go ahead and
open it up and then run the file.
0:22
I already have it installed, but I'll
just run it anyway, couldn't do any harm.
0:25
So click next,
then click I accept and next.
0:28
And then just click next again and
then just click install.
0:31
So Node JS has been
successfully installed.
0:33
Let's click Finish.
0:35
The next one that we have
to install is called Yarn.
0:36
Remember, I have the links to
these websites in the description.
0:39
So just check out the description and
then you can click the link.
0:42
For now, I'm just gonna search up Yarn,
download Windows, and
0:44
then we can click on the installation.
0:47
Then I'm gonna click on Alternatives and
0:50
I'm just gonna click
on Download Installer.
0:52
I'm gonna click on Windows because
I'm using Windows and then that's it.
0:54
So again, you're going to need
to run Yarn by double clicking.
0:57
Now again, I already have Yarn, so
1:00
it's actually not gonna let
me install it this time.
1:02
But you would just click Next and
Next and Next and then Finish and
1:04
then Yarn would be installed.
1:08
So after you've installed Yarn,
there's a few more things to do.
1:09
And first of all, we're just gonna
go to rails installer.org and
1:12
this is one of the main
things that you have to do.
1:16
And I'm just gona click
on Windows Ruby 2.3.
1:19
So this website just hosts a bunch of
packages that you need to install Rails.
1:23
Ruby 2.3 isn't actually
the current version of Ruby.
1:27
So what we're gonna have to do
is update the version of Ruby.
1:30
So once it's installed, I'm just gonna
double click it again just to show you,
1:32
and then I'll click Next and you'd
click Install here and then that's it.
1:37
I'm gonna click Install just to
make sure that I'm with you and
1:41
we have the same setup.
1:43
Okay, so
now I'm just gonna click Finish and
1:44
then the Rails installer
will be installed.
1:46
Okay, so
now we have all the packages for Rails.
1:48
What we need to do is install
the newest version of Ruby.
1:50
So let's go to rubyinstaller.org and then
I'm just gonna click on the one in bold
1:53
and you need to click on
the one in bold as well.
1:57
So just click on that one.
2:00
And then it will install,
and then we're gonna run it.
2:01
And then it will install
the latest version of Ruby.
2:04
It will automatically overwrite
the Ruby that we just installed.
2:07
If you're ever looking to update
to the latest version of Ruby,
2:10
you just come to this website and
you get the latest one.
2:13
So I'm gonna click Install for all users.
2:15
Then I accept the license and
then make sure that this one is clicked.
2:19
Add Ruby executables to your path and
this one as well.
2:23
Click Install and next.
2:26
Okay, so now just click Finish and
now this command window pops up.
2:28
We're just gonna click Enter and it's
gonna install the necessary components.
2:32
And then just click Enter again.
2:35
Once it's finished,
click Enter again and then it goes away.
2:37
Okay, and then just open up a new CMD
window by typing in CMD command prompt and
2:40
then run gem install Rails and that should
install Rails globally on your system.
2:45
So as you can see, it's installing.
2:51
For me I'm in my users directory.
2:52
I'm in the POVA directory.
2:54
Okay, so everything has
successfully been installed.
2:56
And just to verify, we're gonna run
the command Rails-v, V stands for version.
2:59
And let's see what it says.
3:04
And it says rails 7.0.4.3.
3:06
Now we're gonna say Ruby-v same thing.
3:11
Just to take our version
of Ruby 3.2.2 perfect.
3:14
Then we're just gonna check yarn-v.
3:18
It gives us our version.
3:20
And then you can just run the command
node dash V and it gives us our version.
3:21
If you're not getting your version, that
means it's not successfully installed.
3:25
So just make sure that you
have everything installed.
3:28
Okay, so now it looks like that we have
everything installed to get started
3:30
developing with Rails.
3:34
This is so good, and I'm so
excited to get started.
3:35
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up