Chapter 14. Web Apps: Serving HTML
This is the 21st century. Users want web apps. Rubyâs got you covered there, too! Libraries are available to help you host your own web applications and make them accessible from any web browser. So weâre going to spend these final two chapters of the book showing you how to build a full web app.
To get started, youâre going to need Sinatra, a third-party library for writing web applications. But donât worry, weâll show you how to use the RubyGems tool (included with Ruby) to download and install libraries automatically! Then weâll show you just enough HTML to create your own web pages. And of course, weâll show you how to serve those pages to a browser!
Writing web apps in Ruby
An app that runs in your terminal is greatâfor your own use. But ordinary users have been spoiled by the Internet and the World Wide Web. They donât want to learn to use a terminal so they can use your app. They donât even want to install your app. They want it to be ready to use the moment they click a link in their browser.
But donât worry! Ruby can help you write apps for the Web, too.
We wonât lead you onâwriting a full web app is not a small task, even using Ruby. This is going to require all of the skills youâve learned so far, plus a few new ...
Get Head First Ruby now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.