1. Home
  2. Computing & Technology
  3. Ruby

Ruby on Rails Tutorial - Starting the Blog

By , About.com Guide

7 of 8

Start the Server

Start the Webrick server by running the script/server command from your blog directory. Once the server is started, you can start running actions and creating blog posts right away.

blog$ script/server
=> Booting WEBrick...
=> Rails 2.1.0 application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options
[2008-07-02 09:58:55] INFO WEBrick 1.3.1
[2008-07-02 09:58:55] INFO ruby 1.8.6 (2007-09-24) [i486-linux]
[2008-07-02 09:58:55] INFO WEBrick::HTTPServer#start: pid=8231 port=3000

Open your web browser and go to http://localhost:3000/posts. You should see a rather blank page with the text Listing Posts, an empty table of the existing posts and a link named New Post. Click on the New Post link, fill out the form and hit the Create button. A new post has just been created and added to the database. All the work of creating forms and actions to create new posts has already been done for you by the scaffold generator.

Explore Ruby
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Ruby
  4. Ruby on Rails
  5. Start the Server

©2010 About.com, a part of The New York Times Company.

All rights reserved.