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

Gerald Bauer’s Ruby Notebook

Archive for the ‘Ruby’ Category

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

without comments

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 16th, 2008 at 6:15 am

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

without comments

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 22nd, 2008 at 7:40 am

Posted in Ruby, annotate_models, rails

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

without comments

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 15th, 2008 at 7:53 am

Posted in Ruby, atom, rss

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

without comments

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 13th, 2008 at 7:25 pm

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

without comments

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 18th, 2008 at 3:45 am

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

without comments

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 12th, 2008 at 4:43 pm

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

without comments

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 18th, 2008 at 3:08 am

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

without comments

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 13th, 2008 at 9:57 pm