Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Cloning Internet Applications with Ruby
  • Table Of Contents Toc
Cloning Internet Applications with Ruby

Cloning Internet Applications with Ruby

By : Chang Sau Sheong
5 (4)
close
close
Cloning Internet Applications with Ruby

Cloning Internet Applications with Ruby

5 (4)
By: Chang Sau Sheong

Overview of this book

Most users on the Internet have a few favorite Internet web applications that they use often and cannot do without. These popular applications often provide essential services that we need even while we don’t fully understand its features or how they work. Ruby empowers you to develop your own clones of such applications without much ordeal. Learning how these sites work and describing how they can be implemented enables you to move to the next step of customizing them and enabling your own version of these services.This book shows the reader how to clone some of the Internet's most popular applications in Ruby by first identifying their main features, and then showing example Ruby code to replicate this functionality.While we understand that it connects us to our friends and people we want to meet up with, what is the common feature of a social network that makes it a social network? And how do these features work? This book is the answer to all these questions. It will provide a step-by-step explanation on how the application is designed and coded, and then how it is deployed to the Heroku cloud platform. This book’s main purpose is to break up popular Internet services such as TinyURL, Twitter, Flickr, and Facebook to understand what makes it tick. Then using Ruby, the book describes how a minimal set of features for these sites can be modeled, built, and deployed on the Internet.
Table of Contents (13 chapters)
close
close

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.

  1. 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.

  2. Next, go into IRB and run this command:

    > require 'models'
    

    This will require in the necessary classes for creating the database tables.

  3. Run the following command:

    > DataMapper.auto_migrate!
    

    This will create the tables for the application.

  4. 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...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Cloning Internet Applications with Ruby
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon