Applications open until spots fill up - Apply now.

Creating the Blog Application

Creating the Blog Application

August 18, 2015

Project: Build a Ruby on Rails blog with cats (and unicorns)

Rails makes it very easy to generate the files that you need to start building a Rails application. Just open the Terminal on a Mac...

For Mac Users

Go to your Applications folder and click on the Utilities folder. Then click on Terminal to open the app.

Open terminal in Mac OSX

This should open the OSX terminal.

Empty OSX terminal

Now type cd Documents and press enter to navigate to the Documents folder.

Navigate to right folder

... or the Command prompt on Windows.

For Windows Users

Press the Windows key + R to open "Run". Type cmd.exe and press enter.

Open command prompt in Windows

This should open the Windows command prompt. Empty command prompt

We want to create our application in a sensible place, so let's go to a directory that makes sense. Type cd../.. into the command prompt and press enter.

Leave the wrong folder

Now, it should look like the above. Let's go to your Documents folder. Type cd Users/your_name/Documents and press enter. Replace your_name with your username on your computer.

Navigate to right folder

From now on we will refer to the OSX terminal and the Windows command prompt as just the terminal. When you type something into the terminal, you press the enter key and the terminal will execute what you entered. Every command for the terminal will be prefixed with a $ in this tutorial. Don't enter the $ symbol when you copy and paste a command into the terminal.

Creating Rails app

So, let's get started. Type

$ rails new blog

in your terminal and press the enter key. Rails will now generate all the files we need to start building a blog. Once it is finished, we need to go into the newly created folder called blog in the terminal. To do that, we type

$ cd blog

into the terminal and press enter.

Now we want to make sure that everything works just as expected, so we will start up our web server. Type into the terminal:

$ bin/rails server (Mac OS X)
$ ruby bin\rails server (Windows)

and press the enter key again. If you now type http://localhost:3000 in your browser, you should see this page:

Running empty rails app

This shows you that everything is set up correctly and we can get started to make our blog!

Let's open our Sublime Text editor to see all the files that Rails made for us. Open Sublime Text by clicking on the application icon.

Open a folder in Sublime by navigating to File in the top bar.

Open folder in Sublime

Then select the correct folder named blog.

Choose blog folder

You should now see the folder and all it's files in the left hand sidebar in Sublime.

All blog files in Sublime


If you have feedback on this tutorial or find any mistakes, please open issues on the GitHub Repository.

Join Make School

Prepare for your career as a founder or software developer

Apply Now

Talk to Us

If you have any questions, please send us an email

Email Us