rubybook = Blog.new :title => “Gerald Bauer’s Ruby Notebook”, :about => “Internet Professional in Vancouver, B.C.”

Gerald Bauer’s Ruby Notebook

How to use Webby and S6 to generate KeyNote or PowerPoint-like presentations with gradient themes in plain text using a wiki-style markup language

leave a comment »

What’s Webby? Webby is a free, open source tool (in Ruby) that lets you build websites in plain text using the wiki-style markup language of your choice (such as Textile or Markdown.) Webby also lets you build KeyNote or PowerPoint-like presentations. (More Webby Project Site »)

Unfortunately, out-of-the-box Webby’s built-in presentation template (that is, webby-gen presentation <yourfolderhere>) uses the S5 package. Let’s roll our own Webby template to use the S6 package instead.

Read the rest of this entry »

Written by Gerald

February 20, 2009 at 4:38 pm

Posted in redcloth, s5, s6, textile, webby

RedCloth Cookbook: How Tos, Recipes, F.A.Qs - Using the Ruby Plain Text to Web Markup Gem

leave a comment »

What’s Textile? What’s RedCloth?

Textile is a wiki-style markup language that’s easy-to-write and easy-to-read and that lets you author web pages in plain text. RedCloth is the Ruby gem that lets you use Textile in Ruby.

Using RedCloth

Read the rest of this entry »

Written by Gerald

August 16, 2008 at 6:15 am

Rails Tip of the Day: Use Magic Version Tag to “Downgrade” Rails to Older Version When Generating New Project

leave a comment »

Let’s say you try to follow a tutorial or book written for an older version of Rails – lets say Rails 2.0.2 or even Rails 1.2.6. With the “magic” version tag you can “downgrade” Rails to an older version when generating your new project.

Read the rest of this entry »

Written by Gerald

August 6, 2008 at 7:47 pm

Annotate Your ActiveRecord Models with Comments About Your Table Structure - Rails Plugin of the Week

leave a comment »

Welcome to the new Rails Plugin of the Week series highlighting a different Rails plugin (or gem) each week. Let’s kick off the series with the annotate-models gem.

Read the rest of this entry »

Written by Gerald

July 22, 2008 at 7:40 am

Posted in Ruby, annotate_models, rails

How to read web feeds (RSS, Atom) using the standard Ruby library

leave a comment »

Ruby ships with a standard library that lets you read web feeds in the “classic” Really Simple Syndication (RSS) flavors (0.9x/1.0/2.0) and in the “modern” Atom Publishing format. Let’s try it all out pulling web feeds from the Vancouver.rb site.

Read the rest of this entry »

Written by Gerald

July 15, 2008 at 7:53 am

Posted in Ruby, atom, rss

How to use Google’s SMTP server and Gmail to send emails with Ruby

leave a comment »

Let’s send an email using Google’s Gmail server in three easy steps (works for Google Apps for your Domain hosted accounts too!).

  • Step 1: Create a Mailer class
  • Step 2: Setup the Google (Gmail) SMTP server for ActionMailer
  • Step 3: Deliver the email message

Read the rest of this entry »

Written by Gerald

July 13, 2008 at 7:25 pm

Slide Show - A Free Web Alternative to PowerPoint and KeyNote in Ruby

leave a comment »

I’ve uploaded slideshow v0.1 - a Ruby gem that lets you create slide shows and author slides in plain text using a wiki-style markup language that’s easy-to-write and easy-to-read. You can get started in three easy steps:

  • Step 1: Author your slides in plain text using a wiki-style markup language
  • Step 2: Generate your slide show using the slideshow gem
  • Step 3: Open up your slide show in Firefox with the FullerScreen browser addon
  • That’s it. Showtime!

Read the rest of this entry »

Written by Gerald

February 18, 2008 at 3:45 am

How To: Create a mobile web (iPhone) site using iUI and Ruby on Rails 2.0

leave a comment »

Let’s develop a mobile web application using Ruby on Rails running inside a WebKit browser (such as Safari on iPhone) using the iUI library. We’ll create a mini mobile version of Craigslist that lets you browse classifieds for apartments.

Read the rest of this entry »

Written by Gerald

February 12, 2008 at 4:43 pm

Mofo - Getting Started w/ Microformats using Ruby - Web 3.0 In Action

leave a comment »

What are Microformats? Microformats let you turn your web page into a web service using nothing more than simple coding conventions and patterns that work in today’s browsers. If you markup events, people, reviews, locations and more in your web page using Microformats you contribute to the next version of the web – known as the Semantic Web, Web 3.0 or the Giant Global Graph (GGG).

Let’s skip the theory and dive into code and tap into the Giant Global Graph.

Let’s load up the event listing web page for the “Microformats – Adding Semantics to Your Web Site” VanDev meetup on the Yahoo! Upcoming service using mofo – a microformat parser in Ruby.

Read the rest of this entry »

Written by Gerald

January 18, 2008 at 3:08 am

Let’s Go Camping - Getting Started w/ Ruby’s Model-View-Controller (MVC) Web Microframework

leave a comment »

What’s Camping? Camping is a microframework (in less than 4k of code) that lets you develop a web application using the Model-View-Controller (MVC) architecture with all your code stored in a single Ruby script in less then three minutes.

Let’s go camping and create a web application (hello.rb) showing the current time:

Read the rest of this entry »

Written by Gerald

January 13, 2008 at 9:57 pm