Appendix A. Installing the AppFog Gem

The AppFog command line tool is implemented using Ruby, so you need to install it as a Ruby Gem. That also means you must have Ruby installed in order to use the command line tool.

In Ruby, a Gem is a way to package and distribute programs and libraries.

This appendix gives instructions for installing Ruby and the AppFog Gem on various common platforms. The Ruby packages described are those easily installed, except on Macintosh, where Ruby 1.8.7 is preinstalled. These versions of Ruby are not typically used for serious Ruby development, but are adequate for running the AppFog command line tool.

If you are interested in Ruby development, see the last section, The Ruby Version Manager. In addition to the AppFog Gem, you will also need the Sinatra Gem to use with the examples in this book. Sinatra is a free and simple web application framework built on top of Ruby. You can find out more information about Sinatra at http://www.sinatrarb.com.

Installing on Macintosh

OS X comes with Ruby 1.8.7 preinstalled. This version is rapidly falling out of use by the Ruby development community, but it does support the AppFog Gem. If your sole use of Ruby is to work with AppFog, you don't need to install a later version of Ruby. If you do plan to do Ruby application development, consider installing RVM. See the section The Ruby Version Manager.

You'll use the sudo command to install the AppFog Gem. This command requires that you have a non-blank administrator password. For more information, refer to Mac OS X: sudo command requires a non-blank admin password available at http://support.apple.com/kb/HT4103.

To install the AppFog Gem, open a Terminal window, and enter the following two commands:

sudo gem install af
sudo gem install sinatra
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.187.223