Sha256: e24e1cc044d57b15259c7e2072e742354325e3e80cc167c218a13081eb74ae6c

Contents?: true

Size: 1.24 KB

Versions: 3

Compression:

Stored size: 1.24 KB

Contents

= Blog

A simple blog.

== Configuration

Edit the configuration files  in conf/* as needed. 

You can also edit the application configuration parameters
in run.rb.

Dont forget to set your name and the password in the 
lib/blog.rb file:

Blog.username = 'your name'
Blog.password = 'your password'

By default this example uses the MySQL backend. If you want to 
use a different backend dont forget to change it for the DEBUG
and LIVE configurations.

== Run

Exec the following command:

$ ruby run.rb

then point your browser to:

http://127.0.0.1:8069

(if you want to change the server address/port, edit the config.rb
file)

Click at 'Login as owner'

enter the password.

And start adding blog entries :)

== Discussion

The bulk of the code is in the file lib/blog.rb.
If you want to modify the example it is a nice idea to switch
to debug mode. Just run the application in debug mode
to enable autoreloading of actions/templates and extra
debugging information.

$ ruby run.rb --debug

In debug mode the view files (xhtml/xsl/etc) are automatically
reloaded. The controller classes are also relaoded.

You can also attach to a running instance of the blog application
using irb. Just open a new window and issue the following
command:

$ ruby run.rb --console

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nitro-0.10.0 examples/blog/README
nitro-0.11.0 examples/blog/README
nitro-0.12.0 examples/blog/README