Deploying the clone
As usual, I 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 through the command line using the built-in web server. However before we do this, we need to set up the database. I assume that for this application you would have installed MySQL.
At the command line go into the MySQL interactive command console:
$ mysql –u <username> -p <password>
Then do the following:
mysql> create database colony;
This will create the database.
Next, go into IRB and run this command:
> require 'models'
This will require in the necessary classes for creating the database tables.
Run the following command:
> DataMapper.auto_migrate!
This will create the tables for the application.
To run the application, we need to run this at the command line:
$ ruby colony.rb
Then go to
http://localhost:4567/
to see the login...