Hello Ruby on Rails world

Journal entry
February 6, 2006

There is a newer version of this article updated for Rails 3

To some people Rails have a fairly high learning curve. And certainly, it’s somewhat higher than, say, PHP. However, in the longer run learning Rails definitely pays off.

This is a step by step tutorial to getting over the first hurdle: Creating a “hello world” application in Ruby on Rails.

It works in Rails 1.0 assuming you have ruby and rails already installed and working on your system:

  1. rails hello
  2. cd hello
  3. ruby script\generate controller hello
  4. Create a file called index.rhtml in app/views/hello, containing “Hello world”.
  5. ruby script\server
  6. Navigate to http://localhost:3000/hello in your browser and be greeted with your friendly application: “Hello world”

PS: http://localhost:3000/ is a lot prettier “Hello world”-ish page.

Categories
Selling out
Did you know?
Jakob is an independent web application developer who builds awesome stuff for the web. You can hire him to build awesome stuff for you.

Comments and Trackbacks

Komodo Coder April 9, 2006

Thanks for the mini tutorial - very succinct! Thanks!

Commenting on this entry has been closed.