<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Stubbleblog &#187; rails</title>
	<atom:link href="http://www.stubbleblog.com/index.php/tag/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stubbleblog.com</link>
	<description>A curious nerd.</description>
	<lastBuildDate>Mon, 02 Jan 2012 18:30:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Writing Rails Engines #1: Getting Started</title>
		<link>http://www.stubbleblog.com/index.php/2011/04/writing-rails-engines-getting-started/</link>
		<comments>http://www.stubbleblog.com/index.php/2011/04/writing-rails-engines-getting-started/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 13:53:16 +0000</pubDate>
		<dc:creator>Tony Stubblebine</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rails engines]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.stubbleblog.com/?p=496</guid>
		<description><![CDATA[In Rails 3, Engines are miniature Rails applications that you embed into your main application. I think they&#8217;re a great idea, more on that below, but they sure generate a lot of questions once you start trying to build them. A lot. I have notes for four posts at least. Here&#8217;s the first, how to [...]]]></description>
			<content:encoded><![CDATA[<p>In Rails 3, Engines are miniature Rails applications that you embed into your main application. I think they&#8217;re a great idea, more on that below, but they sure generate a lot of questions once you start trying to build them. A lot. I have notes for four posts at least. Here&#8217;s the first, how to get started.</p>
<p><strong>Why Engines?</strong><br />
As an example, let me show you two screen shots. The first is the content management system from CrowdVine. I like a lot of the ideas inside of the CrowdVine version, but hate the implementation (I can say that because I wrote most of it). The second screen shot is from Yak, a simple programmer friendly CMS service that we&#8217;re working on. It has a near identical feature set but a cleaner implementation and much better UI. I want this new CMS to exist within CrowdVine. And whenever I make an upgrade to it, in Yak or CrowdVine, I want it that update available in my other app. This is what Engines are for.</p>
<p><a href="http://www.stubbleblog.com/wp-content/uploads/2011/04/crowdvine_cms.png"><img src="http://www.stubbleblog.com/wp-content/uploads/2011/04/crowdvine_cms.png" alt="" title="crowdvine_cms" width="700" height="361" class="aligncenter size-full wp-image-663" /></a></p>
<p>Engines let you keep your feature together intact: models, controller, and views. It opens up a world of code libraries where the thing you&#8217;re trying to DRY up is UI heavy. Think about authentication, isn&#8217;t there a best practice for the design of a login screen with Twitter/Facebook options that you can just copy? YES! And in fact there are engines for that already, see <a href="https://github.com/icelab/omnisocial">omnisocial</a>.</p>
<p><strong>Creating an Engine</strong></p>
<p>1. <strong>How do you create the boilerplate?</strong> Engines are just Gems with an /app directory, so you could use whatever method you already use for creating Gems. There&#8217;s also an application called <a href="https://github.com/josevalim/enginex">enginex</a> that will give you the basics, but I found I needed much more. So I started with a more robust engine example, <a href="https://github.com/icelab/omnisocial">omnisocial</a>, and edited it. This isn&#8217;t optimal, but it only takes about 15 minutes and is a good way to learn how other people do it. After you&#8217;re done you should end up with a structure like this:</p>
<pre class="brush:ruby">
# Your typical Rails application structure
app
app/models
app/views
app/controllers
app/helpers
app/mailers

# Many people embed a rails application here in order
# to make mocking up a test environment easier.
test

# Engines are just Ruby gems and a lot of the setup lives
# here, as well as your migration and asset files.
lib
lib/my_engine.rb
lib/my_engine
lib/my_engine/engine.rb
lib/generators
lib/generators/my_engine
lib/generators/my_engine/templates
lib/generators/my_engine/templates/assets
lib/generators/my_engine/my_engine_generator.rb

# Having these two directories allows access to
# rails generate
script
script/rails
config
config/routes.rb # Yes, your engine has it's own routes.

# If you generate your migrations they'll be created here
# and you'll need to move them into your assets dir.
db
db/migrate/

VERSION # Example: 0.1.13
Gemfile # Just like any other Gemfile
LICENSE # Apache is a good choice.
README.rdoc
my_engine.gemspec
</pre>
<p>2. <strong>How can I have access to the Rails generator?</strong> Sometimes it&#8217;s helpful to be able to generate migrations or scaffolding. If you approach this like a Gem you&#8217;re not going to have any of the Rails app structure that allows you to call rails generate. But I also learned, through trial and error, that having too much of the structure causes conflicts with the main application, in particular you can&#8217;t have <code>config/initializers</code>. I&#8217;m not sure yet what the minimum is, but you&#8217;ll need <code>script/rails</code> and most of <code>config/</code>.</p>
<p>3. <strong>How do you develop your engine while developing your main app?</strong> Generally during development you want your main application to include a local development copy of your engine and in production to include a public version, for example one sitting on Github. Easy right? You should be able to add gem groups for each Rails environment to your Gemfile, like this:</p>
<pre class="brush:ruby">
group :development do
  gem "my_engine", :path => "../my_engine"
end
group :production do
  gem "my_engine", :git => "git://github.com/yourname/my_engine.git"
end
</pre>
<p>In Bundler 1.0 and earlier, that generates this error message: <code>"You cannot specify the same gem twice coming from different sources."</code> The work around, which I found from <a href="http://www.cowboycoded.com/2010/08/10/using-2-sources-for-a-gem-in-different-environments-with-bundler/">Cowboy Coded</a>, is to use an environment variable. Seriously. This is supposed to be fixed in Bundler 1.1, but I haven&#8217;t been able to confirm this. Here&#8217;s the work around, which involves adding an ENV variable to your .bashrc and using that to control which library gets loaded from your Gemfile.</p>
<pre class="brush:ruby">
# Put this in your .bashrc
# export MY_BUNDLE_ENV="dev"
if ENV['MY_BUNDLE_ENV'] == "dev"
  gem "big_library", :path => "../big_library"
else
  gem "big_library", :git => "git://github.com/tonystubblebine/big_library.git"
end
</pre>
<p>4. <strong>How do I run migrations or use other assets like CSS files and images?</strong> You can&#8217;t do anything useful unless you can run migrations from your engine and include some basic CSS. You need two things, a generator file that tells your main app what to do when you run <code>rails generate my_module</code> and template files that your generator copies into place.</p>
<p>Your asset files will live in <code>lib/generators/my_engine/templates</code>. Your generator, <code>lib/my_engine/big_cms/my_engine_generator.rb</code>, should look like this:</p>
<pre class="brush:ruby">
require 'rails/generators'
require 'rails/generators/migration'
class MyEngineGenerator < Rails::Generators::Base
  include Rails::Generators::Migration

  def self.source_root
    File.join(File.dirname(__FILE__), 'templates')
  end

  # Implement the required interface for Rails::Generators::Migration.
  # taken from http://github.com/rails/rails/blob/master/activerecord/lib/generators/active_record.rb
  def self.next_migration_number(dirname) #:nodoc:
    if ActiveRecord::Base.timestamped_migrations
      Time.now.utc.strftime("%Y%m%d%H%M%S")
    else
      "%.3d" % (current_migration_number(dirname) + 1)
    end
  end   

  def create_migration_files
    %w{create_dummy_table add_foo_fields_to_dummy_table}.each do |migration|
      migration_template "#{migration}_migration.rb", "db/migrate/#{migration}.rb"
      sleep(1) # cheap hack to make sure migration numbers end up being different
    end
  end

  def copy_assets
    copy_file 'assets/stylesheets/my_module.css',  'public/stylesheets/my_module.css'
  end

  def copy_config_files
    copy_file 'my_module_initializer.rb',  'config/initializers/my_module.rb'
  end
end
</pre>
<p>There are a couple of oddities above, most notably the handling of migrations. It seems like you have to implement next_migration_number yourself in order to get migration files with timestamps. Then, because Rails wants migration timestamps to be unique, I needed a delay after each migration to force different timestamps for each migration file. Talk about hacky. I assume that this stuff will just get cleaned up over time.</p>
<p>5. <strong>Where can I get more help?</strong> For now, these are the best two tutorials I could find, both from The Modest Rubyist, <a href="http://www.themodestrubyist.com/2010/03/05/rails-3-plugins---part-2---writing-an-engine/">Rails 3 Plugins: Writing an engine</a> and <a href="http://www.themodestrubyist.com/2010/03/16/rails-3-plugins---part-3---rake-tasks-generators-initializers-oh-my/">Rails 3 Plugins: Rake tasks, generators, and initializers</a></p>
<p>This looks like a black art, right? Either that or I'm doing things the wrong way (please let me know if there are better ways). This is supposed to be the easy part and we're already resorting to cheap hacks. We haven't even started talking about the magic parts--how to customize the engine from within your main application. </p>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://www.stubbleblog.com/index.php/2006/01/etel-2006-day-1/' title='ETel 2006: Day 1.'>ETel 2006: Day 1.</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2005/07/online-ruby-tra/' title='Online Ruby Training'>Online Ruby Training</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2005/07/rubyrailsfedora/' title='Ruby/Rails/Fedora/Apache2'>Ruby/Rails/Fedora/Apache2</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2005/06/ubuntu-on-rails/' title='Ubuntu on Rails: Getting up to speed with Ruby on Rails and Ubuntu'>Ubuntu on Rails: Getting up to speed with Ruby on Rails and Ubuntu</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2007/06/rails-xss-filte/' title='Rails XSS Filter'>Rails XSS Filter</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.stubbleblog.com/index.php/2011/04/writing-rails-engines-getting-started/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Rails XSS Filter</title>
		<link>http://www.stubbleblog.com/index.php/2007/06/rails-xss-filte/</link>
		<comments>http://www.stubbleblog.com/index.php/2007/06/rails-xss-filte/#comments</comments>
		<pubDate>Wed, 20 Jun 2007 22:22:41 +0000</pubDate>
		<dc:creator>Tony Stubblebine</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[foocamp]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[xss]]></category>

		<guid isPermaLink="false">http://www.stubbleblog.com/wp/?p=184</guid>
		<description><![CDATA[I was pushed to put XSS protections into CrowdVine when one of the Foo Camper&#8217;s released this XSS crack into the Foo Camp social network. It causes a person to friend everyone in the network and then inserts itself into your profile. It was brutal. Worse it was a very simple and readable 49 lines [...]]]></description>
			<content:encoded><![CDATA[<p>I was pushed to put XSS protections into CrowdVine when one of the Foo Camper&#8217;s released <a href="http://www.stubbleblog.com/foocamp_xss_hack.js.txt">this XSS crack into the Foo Camp social network</a>. It causes a person to friend everyone in the network and then inserts itself into your profile. It was brutal. Worse it was a very simple and readable 49 lines of code. I took one glance at it and realized that even I know enough javascript to write one of these.</p>
<p>Looking around I saw two approaches for Rails. Run <a href="http://wiki.rubyonrails.org/rails/pages/Safe+ERB">Safe ERB</a> and force yourself to validate each individual input or run <a href="http://www.techno-weenie.net/">Rick Olson&#8217;s</a> <a href="http://svn.techno-weenie.net/projects/plugins/white_list/">white list plugin</a>.</p>
<p>I decided to use the white_list plugin to clean all values in params. It required a little bit of tweaking. Here&#8217;s the details.</p>
<p>Install the white list plugin:</p>
<blockquote><p><code>script/plugin install -x http://svn.techno-weenie.net/projects/plugins/white_list/</code></p></blockquote>
<p>Edit vendor/plugins/white_list/init.rb so that white_list is available in the Controller:</p>
<pre class="brush: ruby; title: ; notranslate">require 'white_list_helper'
ActionController::Base.send :include, WhiteListHelper
</pre>
<p>Add a filter to application.rb in order to walk the <code>params</code> hash:</p>
<pre class="brush: ruby; title: ; notranslate">
before_filter :sanitize_params

def sanitize_params
# TODO: 2007-06-20  -- I found that this didn't
# work when called with params instead of @params. I assume
# I'm clueless in some important regard. (Many important regards?)
@params = walk_hash(@params) if @params and !site_owner?
end

def walk_hash(hash)
hash.keys.each do |key|
if hash[key].is_a? String
hash[key] = white_list(hash[key])
elsif hash[key].is_a? Hash
hash[key] = walk_hash(hash[key])
elsif hash[key].is_a? Array
hash[key] = walk_array(hash[key])
end
end
hash
end

def walk_array(array)
array.each_with_index do |el,i|
if el.is_a? String
array[i] = white_list(el)
elsif el.is_a? Hash
array[i] = walk_hash(el)
elsif el.is_a? Array
array[i] = walk_array(el)
end
end
array
end
</pre>
<p>Does this look right to people? Is there a more idiomatic ruby/rails way to do this? I&#8217;m a bit worried about how this will perform on very large chunks of data or on deeply nested hashes.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://www.stubbleblog.com/index.php/2006/08/rate-my-dance-m/' title='Rate My Dance Moves'>Rate My Dance Moves</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2011/08/uplifting-news-obvious-partnership/' title='Uplifting News About an Obvious Partnership'>Uplifting News About an Obvious Partnership</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2011/04/writing-rails-engines-getting-started/' title='Writing Rails Engines #1: Getting Started'>Writing Rails Engines #1: Getting Started</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2011/02/social-workshop-a-lifetime-of-products/' title='Social Workshop &#8212; A lifetime of products'>Social Workshop &#8212; A lifetime of products</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2011/01/domain-squatting-on-a-unfulfilled-dreams/' title='Squatting on Unfulfilled Dreams'>Squatting on Unfulfilled Dreams</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.stubbleblog.com/index.php/2007/06/rails-xss-filte/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Rate My Dance Moves</title>
		<link>http://www.stubbleblog.com/index.php/2006/08/rate-my-dance-m/</link>
		<comments>http://www.stubbleblog.com/index.php/2006/08/rate-my-dance-m/#comments</comments>
		<pubDate>Thu, 31 Aug 2006 19:22:48 +0000</pubDate>
		<dc:creator>Tony Stubblebine</dc:creator>
				<category><![CDATA[dance]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ratemydancemoves]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.stubbleblog.com/wp/?p=113</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not entirely sure why I built this, but I did, so here you go. <a href="http://www.ratemydancemoves.com">RateMyDanceMoves.com</a> is a hot-or-not style dance rating site built off of YouTube videos.</p>
<p>I really like dance, especially hip hop, and especially if I am standing near the wall and somebody else is doing the dancing. I aspire to be a <a href="http://www.ratemydancemoves.com/show/821">Poppin&#8217; Pete</a> but I have a closer relation to <a href="http://www.ratemydancemoves.com/show/814">this guy</a>.</p>
<p>The dance videos ended up being really good. There&#8217;s a little too much teenage craziness (or worse six-year-old boys dancing to &#8220;I&#8217;m In Love Wit A Stripper&#8221;) but there&#8217;s also plenty of great dancing from <a href="http://www.ratemydancemoves.com/show/173">Dance2XS</a>, <a href="http://www.ratemydancemoves.com/show/809">crazy Japanese game show contestants</a>, and even <a href="http://www.ratemydancemoves.com/show/300">cowboys in sequins</a>.</p>
<p>I check the YouTube for more every day so there should always be <a href="http://www.ratemydancemoves.com/recent">recent</a> entries.</p>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://www.stubbleblog.com/index.php/2007/06/rails-xss-filte/' title='Rails XSS Filter'>Rails XSS Filter</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2006/09/great-comments/' title='Great Comments on Rate My Dance Moves'>Great Comments on Rate My Dance Moves</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2011/08/uplifting-news-obvious-partnership/' title='Uplifting News About an Obvious Partnership'>Uplifting News About an Obvious Partnership</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2011/04/writing-rails-engines-getting-started/' title='Writing Rails Engines #1: Getting Started'>Writing Rails Engines #1: Getting Started</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2011/02/social-workshop-a-lifetime-of-products/' title='Social Workshop &#8212; A lifetime of products'>Social Workshop &#8212; A lifetime of products</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.stubbleblog.com/index.php/2006/08/rate-my-dance-m/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting Started With Web 2.0</title>
		<link>http://www.stubbleblog.com/index.php/2006/04/getting-started-2/</link>
		<comments>http://www.stubbleblog.com/index.php/2006/04/getting-started-2/#comments</comments>
		<pubDate>Sun, 09 Apr 2006 19:34:28 +0000</pubDate>
		<dc:creator>Tony Stubblebine</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[web20]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://www.stubbleblog.com/wp/?p=98</guid>
		<description><![CDATA[This is a list of resources for getting started with Web 2.0, how to understand it, where to find examples of people practicing it, where to learn the technologies behind it, and where to obtain the software that powers it. Originally prepared for my talk on Web 2.0 Opportunities at the Sonoma County Web Developers [...]]]></description>
			<content:encoded><![CDATA[<p><em>This is a list of resources for getting started with Web 2.0, how to understand it, where to find examples of people practicing it, where to learn the technologies behind it, and where to obtain the software that powers it. Originally  prepared for my talk on <a href="http://www.stubbleblog.com/archives/2006/04/upcoming_talk_w.html">Web 2.0 Opportunities</a> at the Sonoma County Web Developers SIG, so that we could have a discussion about opportunities without getting too bogged down in learning the techniques.</em></p>
<h2>What is Web 2.0?</h2>
<p><a href="http://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.html">What is Web 2.0: Design Patterns and Business Models for the Next Generation of Software</a></p>
<p>O&#8217;Reilly Media first popularized the term Web 2.0. This is Tim O&#8217;Reilly&#8217;s essay on the trends and companies defining the second generation of web development.</p>
<p><a href="http://en.wikipedia.org/wiki/Web_2.0">Wikipedia Entry on Web 2.0</a></p>
<p>Wikipedia&#8217;s entry on Web 2.0 with links to major resources. Wikipedia is itself an example of the Web 2.0 idea, &#8220;architecture of participation,&#8221; where the entire content of the encyclopedia is voluntarily contributed, editited and maintained by its readers. For example, <a href="http://en.wikipedia.org/w/index.php?title=Web_2.0&amp;limit=500&amp;action=history">the history page</a>	 for their entry on Web 2.0 shows hundreds of updates from scores of users over the course of the last 16 months.</p>
<p><a href="http://www.sacredcowdung.com/archives/2006/03/all_things_web.html">All Things Web 2.0 &#8211; The List</a></p>
<p>Need examples? This page lists several hundred companies that are built around the ideas of Web 2.0.</p>
<h2>Design</h2>
<p><a href="http://www.webdesignfromscratch.com/current-style.cfm">Current Style in Web Design</a></p>
<p>Overview and examples of the designs that define web 2.0, like simplicity and effective use of whitespace, color, and big text.</p>
<p><a href="http://developer.yahoo.com/ypatterns/index.php">Yahoo&#8217;s User Interface Design Patterns</a></p>
<p>Solutions to the most common design problems with descriptions. Great starting place for the fundamentals of web design. Includes when, why and how to use auto-complete, breadcrumbs, tabs, pagination, and ratings.</p>
<p><a href="http://developer.yahoo.com/yui/index.html">Yahoo&#8217;s UI Components</a></p>
<p>Downloadable UI Widgets and Ajax libraries including a calendar, slider, and tree view.</p>
<p><a href="http://www.alistapart.com/topics/design/">A List Apart</a></p>
<p>Articles on web design, graphic design, and user interface design.</p>
<p><a href="http://www.digital-web.com/topics/web_design/">Digital Web Design Articles</a><br />
More articles on web design.</p>
<h2>Programming</h2>
<p><a href="http://www.rubyonrails.org/">Ruby on Rails</a><br />
Plenty of people are still building websites with Java, PHP, Perl, Python, and .NET. But plenty of other people are finding Ruby on Rails to be a platform that makes the common things trivial while staying out of your way when you want to do the hard things. This is the official Rails site with links to tutorials and documentation.</p>
<p><a href="http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html">Rolling with Ruby on Rails</a></p>
<p>Great tutorial on how to get started with Rails. Takes you from installation to a simple cookbook application</p>
<p><a href="http://www.w3schools.com/js/default.asp">Javascript Tutorial</a><br />
Before you get too far with AJAX you&#8217;re going to have to learn some basic javascript. This is a decent tutorial along with very good documentation.</p>
<p><a href="http://www.alistapart.com/articles/gettingstartedwithajax">Getting Started with AJAX</a></p>
<p>Tutorial that takes you from beginning to end of a simple AJAX page.</p>
<p><a href="http://script.aculo.us/">script.aculo.us</a> and <a href="http://dojotoolkit.org/">Dojo</a><br />
Getting AJAX to work correctly across browsers is hard. So it&#8217;s always better to start with somebody elses code. These are two of the best AJAX libraries.</p>
<h2>Markup</h2>
<p><a href="http://www.shire.net/learnwebdesign/xhtml.htm">Learning XHTML</a></p>
<p>Short and simple explanatioin of the differences between HTML and XHTML.</p>
<p><a href="http://www.7nights.com/asterisk/archive/2004/07/learning-css.php">Learning CSS</a></p>
<p>Great starting point for learning CSS.</p>
<p><a href="http://www.amazon.com/gp/product/059610197X/ref=ase_tonystubblebi-20/">Head First HTML with CSS and XHTML</a><br />
Great book for learning HTML and CSS.</p>
<p><a href="http://www.xml.com/pub/a/2002/12/18/dive-into-xml.html">What is RSS?</a></p>
<p>RSS is a formt for sharing and subscribing to feeds of site updates. Blogs are the most common sites to produce RSS feeds for their sites.</p>
<p><a href="http://www.bloglines.com">Bloglines</a></p>
<p>Even if you&#8217;re not producing RSS, subscribing to other people&#8217;s feeds can be very convenient. Signup for bloglines, a website that specializes in managing subscriptions, put a subscription link on your browser toolbar, and start subscribing.</p>
<p><a href="http://microformats.org">Microformats</a><br />
These are easy ways for you to provide semantic information about the data in your pages so that other people can programmatically parse and process the information. These are just starting to get mainstream traction.</p>
<h2>Software</h2>
<p><a href="http://www.blogger.com">Blogger</a></p>
<p>Blogger is a blog hosting company. They let you create your own blog and start blogging in a matter of minutes. Odeo&#8217;s blog is run by bloggger.</p>
<p><a href="http://www.movabletype.com">MovableType</a></p>
<p>They offer free blog software (the paid versions are for extra support) and have an active community of developers creating add on products. Also their comment spam blocking is very good. That&#8217;ll come in handy if you become popular.</p>
<p><a href="http://wordpress.org/download/">Word Press</a></p>
<p>Offers both blog hosting and free blog software.<br />
<a href="http://www.mediawiki.org/wiki/MediaWiki">MediaWiki</a></p>
<p>Software for collaborative writing where any visitor can add or edit content. This is the software that runs <a href="http://www.wikipedia.org">Wikipedia</a>. There&#8217;s lots of other software that you could choose from, but I think this is the most polished.</p>
<p><a href="http://pbwiki.com/">PBwiki</a></p>
<p>Hosted Wiki. You can signup and get started in a matter of minutes.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://www.stubbleblog.com/index.php/2006/04/upcoming-talk-w/' title='Upcoming Talk: Web 2.0 Making It Big While Keeping It Small'>Upcoming Talk: Web 2.0 Making It Big While Keeping It Small</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2006/01/etel-2006-day-1/' title='ETel 2006: Day 1.'>ETel 2006: Day 1.</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2011/04/writing-rails-engines-getting-started/' title='Writing Rails Engines #1: Getting Started'>Writing Rails Engines #1: Getting Started</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2007/06/rails-xss-filte/' title='Rails XSS Filter'>Rails XSS Filter</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2006/11/obvious-trends/' title='Obvious Trends'>Obvious Trends</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.stubbleblog.com/index.php/2006/04/getting-started-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ETel 2006: Day 1.</title>
		<link>http://www.stubbleblog.com/index.php/2006/01/etel-2006-day-1/</link>
		<comments>http://www.stubbleblog.com/index.php/2006/01/etel-2006-day-1/#comments</comments>
		<pubDate>Wed, 25 Jan 2006 04:10:10 +0000</pubDate>
		<dc:creator>Tony Stubblebine</dc:creator>
				<category><![CDATA[asterisk]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[etel]]></category>
		<category><![CDATA[etel2006]]></category>
		<category><![CDATA[oreilly]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[voip]]></category>
		<category><![CDATA[web20]]></category>

		<guid isPermaLink="false">http://www.stubbleblog.com/wp/?p=85</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m at <a href="http://conferences.oreillynet.com/etel2006/">ETel</a> today, mostly to see old friends but still really enjoying myself. Kudo&#8217;s to the O&#8217;Reilly conference team for always putting on such great events. Here&#8217;s some notes.</p>
<p><strong>RAGI</strong><br />
Every O&#8217;Reilly &#8216;emerging tech&#8217; conference comes up with one technology that is suddenly very easy and very accessible. I think RAGI, a Rails to Asterisk interface, wins this time. I managed to miss the presentation but heard great buzz afterwards. Here&#8217;s an <a href="http://www.oreillynet.com/pub/a/etel/2005/12/19/hacking-in-asterisk-and-rails.html">O&#8217;Reilly introduction.</a> An anonymous Odeo engineer asked about scaling issues in Rails and got back a response that Rails scales well as evidenced by sites like Odeo =)<br />
<strong><br />
AstLinux &#8211; HA</strong><br />
This is a <a href="http://www.astlinux.org/">linux distro</a> tweaked for running Asterisk (mostly the same tweaks that real-time apps get). He&#8217;s working on adding in High Availability support which would give people an N+1 architecture. Too buzz-wordy? Key detail was that HA would work better and be impemented sooner for VOIP.</p>
<p><strong>Zork on Asterisk.</strong><br />
Awesome! Coolest demo of the day goes to <a href="http://uc.org/read/Zasterisk">Zasterisk</a>, a project to let you play Zork over the phone. It&#8217;s does Asterisk to speech recognition (<a href="http://www.speech.cs.cmu.edu/sphinx/">Sphinx</a>) to Zork to text-to-speech (<a href="http://www.cstr.ed.ac.uk/projects/festival/">Festival</a>) and back out.</p>
<p>Imagine playing Zork while on hold or playing a MUD during your commute (VMUD).</p>
<p><strong>VC Fireside Chat.</strong><br />
Sort of dreading this one but the others in the time slote didn&#8217;t look good. Turns out Marc Hedlund was on the panel. Point was start off with a product for yourself, but know when to make the switch to a product for others.</p>
<p>Other VC talking about the types of people he sees in early stage investing (spore stage).  Two. One with a plan and no product. The other with a hack but no plan. He&#8217;s especially interesting if someone has already payed for the hack.</p>
<p>I think the key concept in those two points is that it&#8217;s extremely important to prove that someone likes the product (important if you&#8217;re trying to get investment).</p>
<p>Favorite phrase of the day was along the lines of: vc&#8217;s blog in order to &#8216;chum the waters&#8217;</p>
<p>Marc gave more advice, be plain spoken. Common theme in his engineering management. Complexity is a sign that you don&#8217;t understand the problem. Plain speech also gives people the impression that you know what you&#8217;re doing. Convoluted speech just gives people the impression that _they_ don&#8217;t  know what&#8217;s going on.</p>
<p>More Marc. Hit it where they ain&#8217;t. Find a need that nobody is talking about and go after that. It&#8217;s not that you&#8217;ll be the only person in the space, but that you&#8217;ll be in the first wave.</p>
<p>Quinn Weaver. Open Source is viral marketing. If you create software that is used my millions you can create a company after. Another example of having proven customers. MySQL is a good example of a funded company and 37Signals of a private company. His company <a href="http://www.fairpath.com">Fairpath</a> is planning to give away a Perl to Asterisk software, Dido. Release tomorrow. I like Quinn.</p>
<p><strong>Usability.</strong><br />
A YakPak guy asked who did not have a microphone on their computer. Several Mac people raised there hands.  My hand went straight to my forehead.</p>
<p><strong>Favorite Encounter.</strong><br />
Cooper Marcus of <a href="http://www.sparkparking.com/">Spark Parking</a>.  He&#8217;s got a nice clear business model, pragmatic goals, and cool tech that involves phones and gluing wireless devices to the ground. He&#8217;s also Lowell &#8217;90.</p>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://www.stubbleblog.com/index.php/2011/04/writing-rails-engines-getting-started/' title='Writing Rails Engines #1: Getting Started'>Writing Rails Engines #1: Getting Started</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2006/04/getting-started-2/' title='Getting Started With Web 2.0'>Getting Started With Web 2.0</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2005/08/10-steps-to-a-h/' title='10 Steps to a Hugely Successful Web 2.0 Company'>10 Steps to a Hugely Successful Web 2.0 Company</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2005/07/online-ruby-tra/' title='Online Ruby Training'>Online Ruby Training</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2005/07/rubyrailsfedora/' title='Ruby/Rails/Fedora/Apache2'>Ruby/Rails/Fedora/Apache2</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.stubbleblog.com/index.php/2006/01/etel-2006-day-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another Connection Success Story</title>
		<link>http://www.stubbleblog.com/index.php/2005/09/another-connect/</link>
		<comments>http://www.stubbleblog.com/index.php/2005/09/another-connect/#comments</comments>
		<pubDate>Tue, 27 Sep 2005 00:30:19 +0000</pubDate>
		<dc:creator>Tony Stubblebine</dc:creator>
				<category><![CDATA[connection]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.stubbleblog.com/wp/?p=66</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jasonwong.org/">Jason Wong</a> is an awesome entrepeneur. Back in 1997, I&#8217;d worked on his startup idea to take advantage of cheap storage (Zip drives) to do programatic recording of television (Tivo!). Or something like that. There were definitely zip drives. And at this late date we should probably pretend we were an early version of some other company that made it. Afterwards I lost touch with him, until today, when I <a href="http://connection.oreilly.com/users/profile.public.php?user_id=3724">ran into him on Connection</a>.</p>
<p>He&#8217;s CEO of <a href="http://www.ionami.com/">Ionami</a>, an 8-person web consultancy. He&#8217;s still an entrepeneur and doing big things with Rails. I&#8217;m so happy to run into old friends who are doing well.</p>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://www.stubbleblog.com/index.php/2011/04/writing-rails-engines-getting-started/' title='Writing Rails Engines #1: Getting Started'>Writing Rails Engines #1: Getting Started</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2007/06/rails-xss-filte/' title='Rails XSS Filter'>Rails XSS Filter</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2006/08/rate-my-dance-m/' title='Rate My Dance Moves'>Rate My Dance Moves</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2006/04/getting-started-2/' title='Getting Started With Web 2.0'>Getting Started With Web 2.0</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2006/02/identity-aggreg/' title='Identity Aggregation at Feedication'>Identity Aggregation at Feedication</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.stubbleblog.com/index.php/2005/09/another-connect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Online Ruby Training</title>
		<link>http://www.stubbleblog.com/index.php/2005/07/online-ruby-tra/</link>
		<comments>http://www.stubbleblog.com/index.php/2005/07/online-ruby-tra/#comments</comments>
		<pubDate>Sun, 17 Jul 2005 23:44:06 +0000</pubDate>
		<dc:creator>Tony Stubblebine</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[training]]></category>

		<guid isPermaLink="false">http://www.stubbleblog.com/wp/?p=41</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>Scott Gray, the founder of UserActive, was talking to me about how important hands-on learning is to any sort of training. We talked a little bit about me writing a Ruby or Ruby on Rails class for UserActive and I wanted to get a sense for how the classes work.</p>
<p>I started with <a href="http://www.useractive.com/courses/php.php3?course=php&#038;partnerid=1">Learning PHP</a>. The class is self-paced, you read lab material and type code into an integrated programming sandbox. Then at the end of the lab you take a short test or do a short programming assignment. A grader looks over your work and gives you feedback.</p>
<p>The hands-on piece works! The programming sandbox is really useful and gives you a chance to immediately hack on whatever the lab is teaching you.</p>
<p>The Learning PHP class was geared towards people new to programming or new to the web, for instance there&#8217;s a &#8220;What is a variable&#8221; section. That got me thinking, how would I gear a Ruby on Rails tutorial, towards beginners or towards experts.</p>
<p>Rails has a real following among high level programmers because it abstracts a lot of menial details while also offering enough flexibility to override the defaults. It looks like a Java killer so it&#8217;s ending up in a lot of flame wars about how enterprise ready it is.</p>
<p>People haven&#8217;t explored how easy it is for designers or part-time programmers to use. Is it a PHP killer? Well, you don&#8217;t need to know any Ruby to get a Rails application up. That&#8217;s a good sign. You usually don&#8217;t need to know any SQL. That&#8217;s another good sign.</p>
<p>I wonder if the Model-View-Controller model is too abstract for most non-programmers? In my experience, people will do fine. Our web producers work with a much more abstracted system.</p>
<p>In any case, I think the online lab + sandbox model that UserActive offers would be a great introduction to people who probably aren&#8217;t going to go through the trouble of installing Rails themselves.</p>
<p>In the mean time, here&#8217;s the full <a href="http://www.useractive.com/courses/php.php3?course=php&#038;partnerid=1">UserActive catalog</a>.</p>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://www.stubbleblog.com/index.php/2011/04/writing-rails-engines-getting-started/' title='Writing Rails Engines #1: Getting Started'>Writing Rails Engines #1: Getting Started</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2006/11/youtube-api-how/' title='YouTube API How-To'>YouTube API How-To</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2006/01/etel-2006-day-1/' title='ETel 2006: Day 1.'>ETel 2006: Day 1.</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2005/07/rubyrailsfedora/' title='Ruby/Rails/Fedora/Apache2'>Ruby/Rails/Fedora/Apache2</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2005/06/ubuntu-on-rails/' title='Ubuntu on Rails: Getting up to speed with Ruby on Rails and Ubuntu'>Ubuntu on Rails: Getting up to speed with Ruby on Rails and Ubuntu</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.stubbleblog.com/index.php/2005/07/online-ruby-tra/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ruby/Rails/Fedora/Apache2</title>
		<link>http://www.stubbleblog.com/index.php/2005/07/rubyrailsfedora/</link>
		<comments>http://www.stubbleblog.com/index.php/2005/07/rubyrailsfedora/#comments</comments>
		<pubDate>Sat, 02 Jul 2005 18:42:18 +0000</pubDate>
		<dc:creator>Tony Stubblebine</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.stubbleblog.com/wp/?p=35</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>I had much more trouble with this install than I did for Ubuntu, probably because I was trying to do more.</p>
<p>I started by trying to get packages with yum.<br />
<em>yum install ruby irb ruby-devel</em></p>
<p>That lead to a dependancy issue. I needed <em>apxs</em>, but what package is it in? Ended up being in the <em>httpd-devel</em> package.</p>
<p>Then I moved on to installing mod_ruby. Having the ruby interpreter run inside Apache seems like a good idea &#8211; at least from a performance standpoint. Here&#8217;s the guide I worked from.<br />
<a href="http://www.modruby.net/en/doc/?InstallGuide">http://www.modruby.net/en/doc/?InstallGuide</a></p>
<p>However, it turns out that mod_ruby comes with a slew of namespace complications. From the <a href="http://wiki.rubyonrails.com/rails/show/mod_ruby">rails wiki</a>, &#8220;considered unsafe to use mod_ruby and Rails with more than one application.&#8221;</p>
<p>FastCGI is a safer alternative. The rails wiki has good setup documentation:</p>
<p><a href="http://wiki.rubyonrails.com/rails/show/RailsOnFedora">http://wiki.rubyonrails.com/rails/show/RailsOnFedora</a></p>
<p>I did run into trouble with MySQL &#8211; I needed to tell Rails where the mysql.sock file was. Here&#8217;s a ticket explaining the problem.<br />
<a href="http://dev.rubyonrails.com/ticket/200">http://dev.rubyonrails.com/ticket/200</a></p>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://www.stubbleblog.com/index.php/2011/04/writing-rails-engines-getting-started/' title='Writing Rails Engines #1: Getting Started'>Writing Rails Engines #1: Getting Started</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2006/01/etel-2006-day-1/' title='ETel 2006: Day 1.'>ETel 2006: Day 1.</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2005/07/online-ruby-tra/' title='Online Ruby Training'>Online Ruby Training</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2005/06/ubuntu-on-rails/' title='Ubuntu on Rails: Getting up to speed with Ruby on Rails and Ubuntu'>Ubuntu on Rails: Getting up to speed with Ruby on Rails and Ubuntu</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2007/06/rails-xss-filte/' title='Rails XSS Filter'>Rails XSS Filter</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.stubbleblog.com/index.php/2005/07/rubyrailsfedora/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu on Rails: Getting up to speed with Ruby on Rails and Ubuntu</title>
		<link>http://www.stubbleblog.com/index.php/2005/06/ubuntu-on-rails/</link>
		<comments>http://www.stubbleblog.com/index.php/2005/06/ubuntu-on-rails/#comments</comments>
		<pubDate>Tue, 28 Jun 2005 00:45:15 +0000</pubDate>
		<dc:creator>Tony Stubblebine</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.stubbleblog.com/wp/?p=34</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>I got my introduction to Rails with O&#8217;Reilly&#8217;s <a href="http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html">Rolling with Ruby on Rails</a> article. Unfortunately, it&#8217;s very Windows oriented. Thankfully there&#8217;s great docs for getting everyting going on Debian or Ubuntu.</p>
<p><b>Install Ruby on Rails</b><br />
The Ruby on Rails wiki provides a <a href="http://wiki.rubyonrails.com/rails/show/RailsOnUbuntuDebianTestingAndUnstable">great tutorial</a>. Basically, you apt-get install a bunch of ruby packages, manually install rubygems (a ruby module manager a la CPAN), and then use <em>gems</em> to install rails. I needed to have <em>sudo</em> to run most of the commands.</p>
<p><b>Read About Rails</b><br />
You can start on <a href="http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=2">page 2 of the O&#8217;Reilly Article</a>, since the first page is all about installing on Windows. There&#8217;s more Windows-centricity to work around, see below.</p>
<p><b>The Webserver</b><br />
The article recommends using the supplied webserver. I used that for now since I was more interested in getting a taste of Ruby than I was of Apache conf files. Initially I started the webserver in the background, but it spits a lot of output. You&#8217;ll probably want to redirect the output with a command like.</p>
<blockquote><p>ruby script/server &#038;> /tmp/rubylog</p></blockquote>
<p><b>The Database</b><br />
The article assumes a GUI MySQL admin interface. I prefer the command line. Here&#8217;s a <a href="http://www.onlamp.com/onlamp/2005/03/03/examples/cookbook.sql">sql file</a> that handles all the table creations for you.</p>
<p><b>Gotchas</b><br />
The database/model naming convention is goofy. Table names are plural, foreign keys singular, and models singular. That tripped me up. I&#8217;d much prefer the table names be singular so that they can match the foreign keys.</p>
<p>A lot of the commands in the article were written for a Windows server so some of the slashes are backwards.</p>
<p><b>Resources</b><br />
<a href="http://www.onlamp.com/pub/a/onlamp/2005/03/03/rails.html">Rolling on Rails, Part Two</a><br />
<a href="http://www.slash7.com/articles/2005/01/24/really-getting-started-in-rails">Explanation of Minutae in the Rolling Articles</a><br />
<a href="http://www.rubycentral.com/book/index.html">Programming Ruby</a>, the book, online, for free.<br />
<a href="http://www.rubyonrails.com/">Ruby on Rails site</a></p>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://www.stubbleblog.com/index.php/2011/04/writing-rails-engines-getting-started/' title='Writing Rails Engines #1: Getting Started'>Writing Rails Engines #1: Getting Started</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2006/01/etel-2006-day-1/' title='ETel 2006: Day 1.'>ETel 2006: Day 1.</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2005/07/online-ruby-tra/' title='Online Ruby Training'>Online Ruby Training</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2005/07/rubyrailsfedora/' title='Ruby/Rails/Fedora/Apache2'>Ruby/Rails/Fedora/Apache2</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2009/12/how-to-use-a-verizon-usb-card-with-ubuntu/' title='How to use a Verizon USB Card with Ubuntu'>How to use a Verizon USB Card with Ubuntu</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.stubbleblog.com/index.php/2005/06/ubuntu-on-rails/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  www.stubbleblog.com/index.php/tag/rails/feed/ ) in 0.44403 seconds, on Feb 4th, 2012 at 3:34 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 11th, 2012 at 3:34 am UTC -->
