Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Implementing AppFog

You're reading from   Implementing AppFog Getting to grips with the AppFog service is easily achieved with this hands-on guide, which walks you through creating and deploying applications to the cloud. You'll be developing your first application in minutes.

Arrow left icon
Product type Paperback
Published in Nov 2013
Publisher Packt
ISBN-13 9781849698184
Length 86 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

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 'http://rubygems.org'

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...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image