O'Reilly logo

Cloning Internet Applications with Ruby by Chang Sau Sheong

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Deploying the clone

As in the previous chapter, we will deploy to the local machine (your desktop or laptop) and then to Heroku. The steps are quite similar except for one or two minor differences.

Deploying locally

For development purposes we would normally run it off the command line using the built-in web server. However, before we do this, we need to set up the database. Let's assume that for this application we have installed MySQL. At the command line go into the MySQL interactive command console:

$ mysql u <username> -p <password>

Then just do a simple:

mysql> create database tweetclone;

This will just create the database. Next, go into IRB and run the following command:

> require 'models'

This will require the necessary classes for creating ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required