7 days of WordPress plugins, themes & templates - for free!* Unlimited asset downloads! Start 7-Day Free Trial

Next lesson playing in 5 seconds

  • Overview
  • Transcript

2.1 Sign Up and Install the Heroku Toolbelt

The first step when using Heroku is to install the command-line tools that the platform provides for developers. In this lesson, I’ll show you how to install the Heroku Toolbelt and also how to sign up for an account.

Related Links

2.1 Sign Up and Install the Heroku Toolbelt

The first steps into deploying our application on Heroku is to actually have an account in the system. So we're gonna click on sign up. From here we'll be able to type in our details. So I'll just type in my name, my email address, which is going to be the Tuts+ one. And I also want to mention that I work for Tuts+. After that, you'll be able to create your free account which will send an email into your inbox. I've already created such an account. And I have the Heroku confirmation email right here. This is the email that you'll receive, and from here you'll be able to click on this link to confirm your account. Once you're there, you'll be able to set your password. I'm just going to type in a random password. You can tell that it's a rather weak password, but we're just going to stick to it. Let's set the password and log in automatically. There you go. Now, let's go ahead and click on this link, just to proceed to the dashboard. The dashboard contains all of our data regarding our Heroku apps. Since we don't have any, we're going to start fresh. We're not gonna have anything in here. The process of creating an application will be done in the command line. So the application that we're going to use is the one that we've covered in the Rails course. The link to that project is in the introduction video. So we're going to start by cloning the repository. We're going to type in git clone and then the address for the repository. So we'll type in github.com/tutsplus/getstartedwithRubyonR- ails. We'll press enter to clone the entire repository. And now we have access to it. So if you enter this folder, you will see the entire repository with its log. What should we do in order to create our application as a clean slate? Well, there's something that we need to do beforehand. We need to install the Heroku Toolbelt. But how do we do it? Well, we'll need to check one of these links. You can see we have many different platforms to choose from. We'll click on Ruby, and this will point out to the Development Center web page with loads of information on how to set it up. I'm gonna click on setup here, and you will see this odd-looking button. You can choose one of the different installation methods for the Heroku Toolbelt. Remember, if you're using Mac OS X, choose this one, or on Windows or even an Ubuntu-based system. If you're like me that uses Arch Linux or any other distribution that's not one of these three, you will want to choose the stand-alone version. Depending on the scenario, you will have different installation methods. Just make sure to follow the instructions and you should be fine. From there, you should be able to go back to the command line and type in Heroku, just like that. You can see that all of the application commands are here, so Heroku is correctly installed in my system. The next step is to type in Heroku login, this will make sure that our credentials are passed in and the application will go straight into our account. So I'll just type in my Tuts+ email address and the password. Okay. There you go. The authentication was successfully placed and now we can type in our Heroku create method. This command will take an argument which will be the name of our application. Let's say we want to call it, let's see, tutsplus-projects, like so. Let's see if this application is not in there, so let's just type in Heroku create. And you can see that it's already taken. Most likely I have used this in the past, so I'll just type in tutsplus/projects2. There you go. Awesome. So we have a new stack which is the Cedar-14 stack from Heroku. Never mind this. This is most likely a detail. It basically regards the installation on Ruby and on Rails and stuff like that. So we'll consider this most important URL. The first URL matches the URL of our application. Anytime we want to test our app, we need to type in this URL into the browser. And this is the git repository to which we should push our application changes. The way Heroku works is through git. You push your changes into the repository and Heroku interprets it as a new deploy. But that's going to be for another lesson, of course. This is just a basic bootstrap to have our application registered in the Heroku server. From here, there's no one that will take this URL from us. Now let's jump into the next lesson to learn about how we need to prepare the application to go into Heroku.

Back to the top