Learn the minimum steps required to create a Sinatra project and launch a web server to make the project available to a web browser.
- [Instructor] In this chapter,…we're going to be learning how to write our routes in Sinatra.…We're going to start out by first learning…how to launch the Sinatra Server,…that is what's the minimum amount that we need to set up…in order to get Sinatra up and running.…And that's going to give us an opportunity…to see the default route.…So we'll learn about launching the server…and the default route in this movie.…In order to get Sinatra up and running,…we need to make sure that we first have…a Sinatra Initialization File.…This is the file that's going to get things going.…You can also think of it as your routing file,…although you could store your routes somewhere else.…
The first step is you must require the Sinatra RubyGem.…That means that all of the abilities of Sinatra…will be loaded in and ready to use.…After that, you need to make sure that you have…a root route definition, those are the two requirements.…Load the Sinatra Gem, have a root route definition.…And then you can take that file and save it anywhere.…
- Installing Sinatra
- Launching the server
- Defining routes
- Using route patterns and parameters
- Redirecting requests
- Rendering dynamic templates
- Using partial templates and layouts
- Defining custom helpers
Skill Level Intermediate
Ruby on Rails 5 Essential Trainingwith Kevin Skoglund10h 21m Beginner
Ruby on Rails: Get More From ActiveRecordwith Kevin Skoglund4h 27m Intermediate
3. Helpers and Filters
4. Useful Techniques
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.