Bummer! This is just a preview. You need to be signed in with a Pro account to view the entire video.
Installing Libraries Used by Ruby1:58 with Jay McGavren
In previous courses, we've been working with Rails in the "development" and "test" environments. In order to make our work publicly accessible, we're going to need a server with a "production" Rails environment. Let's get Ruby and Ruby on Rails installed on our server. There are several Linux libraries that need to be in place before we can install Ruby. So first we'll use your system's package manager to install those.
To follow along you'll need a Linux server or virtual machine. It should be set up with a deployment user that has full administrative access via the
If you have a hosting service such as Amazon Web Services, Rackspace, or DigitalOcean, you can just set up a server through your account there. If you don't, visit our Linux Servers on VirtualBox workshop to learn how to run a Linux server within your current operating system on your computer (for free!).
Installing System Libraries
Before you can install Ruby, you'll need to run these two commands on your server. (The
$ represents the prompt, so leave that out.)
$ sudo apt-get update $ sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev libffi-dev nodejs
In previous courses, we've been working with rails in the development and
In order to make our work publicly accessible,
we're going to need a server with the production rails environment.
Let's get Ruby and Ruby on Rails installed on our server now.
To follow along, you'll need a Linux server or virtual machine.
It should be set up with a deployment user that has full administrative access via
the sudo command.
If you don't have these, see the teacher's notes for more info.
So, first, we're going to need to install some development libraries
that are needed by Ruby and Rails.
So let's log into our server, via SSH.
We'll use our deployment account.
And the name of the server we need to connect to.
Since we're installing new software packages,
we're going to need administrative access, so we're gonna use the sudo command.
And then we're gonna use sudo to run the apt-get command to use our package
First, we're going to make sure that all it's libraries are up to date by
running the update command.
It'll ask for our sudo password.
And then it'll update it's list of available packages.
Now we need to install the actual packages we need.
So we're gonna run apt-get again, but
instead of the update sub-command, we're gonna run the install sub-command.
And I'm just gonna paste in this list of packages that we need.
It's pretty long, so you can just copy and
paste this command from the teacher's notes.
It'll ask if you want to continue with installing these packages with yes as
the default so we'll just hit enter.
And it'll download and install everything automatically.
This might take a little while.
When it returns to your system prompt,
all the packages needed by Ruby on Rails will be installed.
You need to sign up for Treehouse in order to download course files.Sign up