Book Image

Implementing AppFog

By : Matthew Nohr, Isaac Rabinovitch
Book Image

Implementing AppFog

By: Matthew Nohr, Isaac Rabinovitch

Overview of this book

AppFog is the leading platform-as-a-service provider of PHP, Ruby, Node.js, and Java solutions. It is used by developers worldwide to deploy tens of thousands of applications. AppFog delivers a reliable, scalable, and fast platform for deploying applications in the cloud.This book is a hands-on guide that will walk you through creating and deploying applications to the cloud using AppFog, which will allow you to get your application deployed without the hassle of setting up servers.This book demonstrates how to use the AppFog service to build an application and have it running in the Cloud. It will walk you through the initial AppFog setup process and explain how to create your first application in minutes.You will also discover how to use services such as databases to make your applications more powerful. You will also learn how to create applications from scratch.You will find out everything you need to know to get an application running in the cloud for the first time.
Table of Contents (13 chapters)
Implementing AppFog
About the Authors
About the Reviewers

Changing Gemfile

As we've added new Gems to this project, we need to change part of the overall project configuration. This is contained in Gemfile, a simple list of Gems used in the project. The old version is as follows:

source :rubygems

gem "sinatra"
gem "thin"

The first line indicates a standard server for downloading Gems. This server has been deprecated for security reasons, so we'll change it in a moment.

Notice that Gemfile contains a line for the Sinatra Gem, which we referenced in the application, and an additional Gem, thin. This is a simple web server used by the Sinatra framework.

The modified Gemfile incorporates new Gems and a safer source:

source ''

gem "sinatra"
gem "thin"
gem "json"
gem "mysql2"

When you modify Gemfile, you must incorporate changes using the following command:

bundle install

If you do not have "bundle" installed, you will have to install that gem before running bundle install. To do this, simply run the following command:

sudo gem install...