The application requires the Sinatra Gem to run. If you don't know how to install this Gem, refer to Appendix A.
Go to the directory containing the application and use the Ruby command to run the main source file.
$ cd insideaf1 $ ruby app.rb [2013-04-18 13:59:22] INFO WEBrick 1.3.1 [2013-04-18 13:59:22] INFO ruby 1.9.3 (2012-04-20) [i686-linux] == Sinatra/1.4.2 has taken the stage on 4567 for development with backup from WEBrick [2013-04-18 13:59:22] INFO WEBrick::HTTPServer#start: pid=11048 port=4567
Now send your browser to
http://localhost:4567/. The same application page you saw in Chapter 1, Getting started with Appfog appears. This time the application is running on your system instead of running on the cloud infrastructure.
To terminate the application, return to the command line and press Ctrl + C.
^C == Sinatra has ended his set (crowd applauds) [2013-04-18 14:51:49] INFO going to shutdown ... [2013-04-18 14:51:49] INFO WEBrick::HTTPServer#start done...