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 Rails 8 Course - Beginner to Intermediate!
Preview
Video Player
00:00
00:00
00:00
- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Learn how to install Rails on a Windows computer.
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
Hello everyone and welcome, the first
thing that we're gonna do is actually
0:00
install Ruby on Rails, if you already have
it installed that you can skip this part,
0:03
but yeah, we're gonna install it.
0:06
So, the first thing we're gonna do is
search up, turn windows features on or
0:08
off, do you see the one called
Virtual Machine Platform?
0:11
We're gonna turn that one on, then we're
also gonna need to turn on two more ones
0:14
and that is called Windows Subsystem for
Linux, and
0:17
it's also called
Windows Hypervisor Platform.
0:20
These are certain prerequisites that we
need to actually install Ruby on Rails on
0:22
windows, we're gonna
be doing it via Linux.
0:26
So we're actually gonna install
a subsystem for Linux on windows, and
0:28
it's gonna take few gigabytes,
so make sure you have the space.
0:31
And once you have these turned on, it's
gonna require us to restart our computer.
0:33
So go ahead and restart your computer, and
0:37
as you can see now it says to
restart the computer, so restart.
0:38
Okay, so now that you've restarted your
computer, go to the Microsoft Store, and
0:41
then inside of here we're just going to
install something called Windows Terminal,
0:44
which is what I'm going to
be using in the course.
0:47
So make sure you have Windows Terminal
installed, it's a really good terminal,
0:49
and install that, once you have that done,
go and install VS code,
0:52
VS Code also stands for
Visual Studio code.
0:55
And search up Visual Studio code and then
just go on here, and then say Download for
0:57
windows, and as you can see, it's gonna
download now and then open it up and
1:01
set it up and that's it.
1:04
Next, let's go back to
the Microsoft Store and inside of here,
1:06
we're gonna search up Ubuntu.
1:09
This is the version of Linux that we're
going to run, and inside of here,
1:11
we're gonna click on the one that says,
the 2022.04.5 LTS, LTS stands for
1:14
Long Term Support.
1:18
So make sure to get this one,
hit Install, it's gonna install,
1:20
it's gonna take like about 15 minutes,
20 minutes depending on your Wi-Fi.
1:22
Once that is installed, you're gonna have
to search up Ubuntu, and then you're gonna
1:25
get given a terminal, and then there's
gonna be some setup instructions here.
1:29
Should only take a few seconds,
you won't need me to guide you, okay, so
1:32
once you have Ubuntu Installed, go ahead
and open up your windows terminal.
1:35
We're gonna be using a guide from Digital
Ocean to install rails, as you can see,
1:38
I have it on the right, this will be
linked in the description of the video.
1:42
So we're gonna go down here and we're
gonna copy these commands in here, so
1:45
RBENV is the Ruby version package manager,
so we're gonna need to install that first.
1:48
So go ahead and run sudo apt update,
it's gonna ask me for my password,
1:53
now that that's done,
we're gonna go ahead and
1:56
install the dependencies required for
Ruby.
1:58
As you can see, that's done,
run the next command,
2:00
now we need to add RBENV to our path,
so run that command.
2:03
Now, I'm just gonna hit Clear,
so you can see echo eval and
2:06
then we're gonna get source, and
after running all of these command,
2:09
now we can actually run type RBENV and
we should see this output.
2:13
Now, we're actually going to install Ruby,
so go ahead and run the next command,
2:17
which is RBENV install-l, as you can see,
I've already got everything installed.
2:21
So another thing's gonna happen,
and now to actually install Ruby,
2:25
we're gonna run RBENV install 3.4.1.
2:29
Now that we have actually installed Ruby,
we're gonna go ahead and
2:32
set as the default version.
2:34
To do that,
run the command rbenv global and
2:36
then the version, so 3.4.1,
now we can run ruby-v, and
2:39
now we can see that Ruby has
successfully been installed on our WSL.
2:43
Next, we're going to install bundler, so
to do that, scroll down the tutorial and
2:48
we're gonna run our first command,
echo gem no document from that.
2:51
And then done gem install bundler, and
2:54
then next we're actually going
to install Ruby on Rails.
2:56
So to do this, we're gonna go ahead and
run gem install rails, this is gonna
2:59
automatically install the newest version
of rails, if we wanna specify a version,
3:03
then we can just run -V and then
the version, but we wanna run the newest.
3:08
So hit Enter, and as you can see,
now it's installing Rails.
3:12
It looks like it has been installed and
3:14
now we have to run rbenv rehash just to
allow the commands to actually enter.
3:16
So I'm just gonna full screen, hit Clear,
and then we're just gonna bump it up and
3:20
we're gonna do make.
3:24
Well, first of all do ls and
it's just the beginner and Rails.
3:25
So I'm just gonna go into Rails,
so cd rails.
3:28
And then we're gonna do
rails new twitter clone.
3:30
Rails new stands for, well,
that creates a new application and
3:33
we're gonna call it twitterclone,
re-hit Enter.
3:36
If we hit ls, then we can go into
twitterclone, so cd twitterclone.
3:38
And now if we do code dot should
open it up in Visual Studio code.
3:42
As you can see, it's actually
installing VS Code Server for Linux.
3:45
So we're gonna have to install that.
3:48
Now it's opening up Visual Studio code,
and as you can see,
3:49
we have our application here.
3:52
Now that we have our application,
I know that Rails was installed correctly,
3:53
I'll go ahead and
show you what all of these files do.
3:56
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