Book Image

Bootstrap for Rails

By : Syed F Rahman
Book Image

Bootstrap for Rails

By: Syed F Rahman

Overview of this book

Table of Contents (18 chapters)
Bootstrap for Rails
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Setting up a Todo application in Rails


Since this book is targeted for Rails developers, I assume that you already have basic knowledge of Rails development. You should also have Rails and Ruby installed in your machine to start with.

Note

While writing this book, Ruby 2.1.1 and Rails 4.1.4 was used.

Let's first understand what this Todo application will do. Our application will allow us to create, update, and delete items from the Todo list. We will first analyze the folders that are created while scaffolding this application and which of them are necessary for templating the application.

So, let's dip our feet into the water:

  1. First, we need to select our workspace, which can be any folder inside your system. Let's create a folder named Bootstrap_Rails_Project. Now, open the terminal and navigate to this folder.

  1. It's time to create our Todo application. Write the following command to create a Rails application named TODO:

    rails new TODO
    
  2. This command will execute a series of various other commands that are necessary to create a Rails application. So, just wait for sometime before it stops executing all the codes. If you are using a newer version of Rails, then this command will also execute bundle install command at the end. Bundle install command is used to install other dependencies.

The output for the preceding command is as follows:

Now, you should have a new folder inside Bootstrap_Rails_Project named TODO, which was created by the preceding code. Here is the output: