<?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; ruby</title>
	<atom:link href="http://www.stubbleblog.com/index.php/tag/ruby/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>Putting Rails to Work</title>
		<link>http://www.stubbleblog.com/index.php/2006/11/putting-rails-t/</link>
		<comments>http://www.stubbleblog.com/index.php/2006/11/putting-rails-t/#comments</comments>
		<pubDate>Wed, 15 Nov 2006 23:52:12 +0000</pubDate>
		<dc:creator>Tony Stubblebine</dc:creator>
				<category><![CDATA[documentation]]></category>
		<category><![CDATA[meetup]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.stubbleblog.com/wp/?p=140</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><a href="http://writertopia.com/">Bill Katz</a> led a great panel at <a href="http://ruby.meetup.com/6/calendar/5156881/">last night&#8217;s Ruby Meetup</a>, hosted by <a href="http://www.obvious.com/">Obvious Corp</a>. The panelists were <a href="http://blog.codahale.com/">Coda Hale</a>, <a href="http://www.anarchogeek.com/">Evan Henshaw-Plath</a>, <a href="http://javathehutt.blogspot.com/">Michael Kovacs</a>, <a href="http://blog.hasmanythrough.com/">Josh Susser</a>, <a href="http://errtheblog.com/">Chris Wanstrath</a>, and Florian Weber (I&#8217;ve worked with three of those guys!).</p>
<p>Josh Susser talked about how he&#8217;d abandoned rails generate in favor of maintaining an exemplar project in subversion. After tweaking acts_as_authenticated and acts_as_taggable I think that&#8217;s not a bad idea.</p>
<p>Chris Wanstrath talked about how CNet is using Rails to build Chow.com and Chowhound.com. They use microformats to syndicate content from one site to another. I&#8217;m know that&#8217;s not the first production use of microformats but it&#8217;s definitely the first time I&#8217;ve heard someone outside of the microformats website talking about a real world use. Chris <a href="http://errtheblog.com/post/37">just released mofo</a>, a microformats parser for ruby.</p>
<p>Michael Kovacs showed his new <a href="http://javathehutt.blogspot.com/2006/11/rails-realities-part-20-sortable.html">get_sorted_objects</a> plugin for creating sortable HTML data tables.</p>
<p>Coda Hale talked about the importance of a staging environment and how effective Wesabe&#8217;s integration of campfire (group chat) and continuous integration is. I&#8217;ve done continuous integration with breakages going out over email and the group chat way is definitely more effective. I never check in code without waiting in the chatroom to see that the tests didn&#8217;t break. Looking bad in front of your coworkers is an ok deterrent. But knowing that they&#8217;re going to start talking smack about you behind your back, that&#8217;s a great deterrent. Also the company that Coda and I have been working on might launch very very soon. Look out for <a href="http://www.wesabe.com">Wesabe</a>!</p>
<p>Evan Henshaw-Plath talked about the <a href="http://caboo.se/doc.html">caboo.se documentation project</a>. It looks awesome. That sparked a discussion about how the rails core team needs more support.</p>
<p>Florian Weber, who&#8217;s on Rails core, agreed, but thought there was some confusion caused by people who were complaining without offering constructive advice. He also pointed out that at least Rails is headed in the right direction, it&#8217;s filling a major need and it isn&#8217;t suffering from feature bloat.</p>
<p>There were also a few lighting talks and announcements.</p>
<p>My favorite was a round of people announcing that they were hiring. After about ten people made this announcement the question was flipped to &#8220;who&#8217;s looking for  a job?&#8221; Nobody.</p>
<p><a href="http://www.zvents.com/">Tyler Kovacs from ZVents.com</a> showed off his new <a href="http://blog.zvents.com/2006/10/31/rails-plugin-custom-benchmarks">custom_benchmarks plugin</a> for adding your own information to the benchmark line logged at the end of each rails request.</p>
<p><a href="http://www.kongregate.com">Kongregate, a flash games community and marketplace</a> gave a demo. They&#8217;re in private beta but you can request an invite from their home page. Special preference for people at the Ruby meetup. Here&#8217;s what <a href="http://www.techcrunch.com/2006/10/19/kongregate-a-next-generation-web-games-marketplace/">TechCrunch had to say about them</a>. If you don&#8217;t think flash games can be cool, check out <a href="http://www.playpacman.net/raiden_x/">Raiden-X</a>.</p>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://www.stubbleblog.com/index.php/2006/05/search-ruby-gem/' title='Search Ruby Gem (rdoc) Documentation'>Search Ruby Gem (rdoc) Documentation</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/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/09/blaines-odeo-ex/' title='Blaine&#8217;s Odeo Extractions'>Blaine&#8217;s Odeo Extractions</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>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.stubbleblog.com/index.php/2006/11/putting-rails-t/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YouTube API How-To</title>
		<link>http://www.stubbleblog.com/index.php/2006/11/youtube-api-how/</link>
		<comments>http://www.stubbleblog.com/index.php/2006/11/youtube-api-how/#comments</comments>
		<pubDate>Wed, 08 Nov 2006 22:46:57 +0000</pubDate>
		<dc:creator>Tony Stubblebine</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[mashup]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.stubbleblog.com/wp/?p=134</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<h2>What is it</h2>
<p>The <a href="http://www.youtube.com/dev">YouTube API</a> lets you search for videos and display them on your site. For example, I use the API to pull videos tagged dance and display them on <a href="http://www.ratemydancemoves.com">Rate My Dance Moves</a>. The YouTube API is currently the 10th most popular API on ProgrammableWeb with <a href="http://www.programmableweb.com/api/YouTube/mashups">46 mashups</a>.</p>
<p>To get started you need to sign up for a <a href="http://www.youtube.com/signup?next=my_profile_dev">developer account</a>. That will give you the developer id required to use the API.</p>
<h2>Using the API</h2>
<p>The major API methods are for retrieving lists of videos, which you can do by <a href="http://www.youtube.com/dev_api_ref?m=youtube.videos.list_by_tag">tag</a>, <a href="http://www.youtube.com/dev_api_ref?m=youtube.videos.list_by_user">user</a>, <a href="http://www.youtube.com/dev_api_ref?m=youtube.users.list_favorite_videos">user favorites</a>, and <a href="http://www.youtube.com/dev_api_ref?m=youtube.videos.list_featured">featured</a>. The information returned from the list methods is usually enough to display a video on your site. All you have to do is plug the video id into the web snippit below.</p>
<pre>
<code>
&lt;object width="425" height="350">
&lt;param name="movie" value="http://www.youtube.com/v/<strong>ID</strong>&#038;autoplay=1">
&lt;/param>
&lt;embed src="http://www.youtube.com/v/<strong>ID</strong>&#038;autoplay=1"
type="application/x-shockwave-flash" width="425" height="350">&lt;/embed>
&lt;/object>
</code>
</pre>
<p>Most of the information you need is in the video list methods. However, if you want a list of comments or channels for the video you&#8217;ll need to call the <a href="http://www.youtube.com/dev_api_ref?m=youtube.videos.get_details">get_details</a> method.</p>
<p>One complaint I had with <code>list_by_tag</code> is that the results come back ordered by relevance rather than recency. That means if you want to build a self-updating site you need to either regularly crawl the entire result set (results are paged) or sit on one of the  <a href="http://www.youtube.com/dev_api_ref?m=youtube.videos.list_by_tag">RSS Feeds.</a></p>
<h2>API Wrappers</h2>
<p>There are good libraries  for using the YouTube API with Perl, Ruby, and .NET. If you&#8217;re using another language, say Java, PHP or Python, you&#8217;ll have to write some code yourself. I&#8217;ve included links to example PHP and Python code and listed an example Ruby program that you can use as a template for whatever language you&#8217;re writing in.</p>
<p>There&#8217;s two competing Perl modules, but Hironori Yoshida&#8217;s <a href="http://search.cpan.org/author/YOSHIDA/WebService-YouTube-0.04/lib/WebService/YouTube.pm">WebService::YouTube </a> and <a href="http://search.cpan.org/author/YOSHIDA/WebService-YouTube-0.04/lib/WebService/YouTube/Feeds.pm">WebService::Youtube::Feeds </a> seem best based on the recent development activity and strength of documentation. His is the only wrapper which includes support for the feeds, nice since the feeds have functionality thats not in the API (namely list by recency).</p>
<p>Shane Vitarana released a <a href="http://shanesbrain.net/articles/2006/09/28/a-ruby-interface-to-the-youtube-api">YouTube Ruby Gem</a> after I&#8217;d built RateMyDanceMoves. Too bad, since it seems like the most polished of all the wrappers.</p>
<p>Eamonn Flynn has a <a href="http://www.eamonnflynn.net/YouTubeDotNet/YouTubeApi.htm">.NET wrapper for the YouTube API.</a></p>
<p>There doesn&#8217;t seem to be a packaged PHP library but these two tutorials from waxjelly should be enough to get you started. <br />
<a href="http://www.waxjelly.com/2006/08/28/simple-php-script-using-the-youtube-api-with-pagination-part-1/">Simple PHP Script Using the YouTube API with Pagination</a><br />
<a href="http://www.waxjelly.com/2006/08/29/a-more-complex-php-script-using-the-youtube-api-with-video-details-part-2/">A More Complex PHP Script Using the YouTube API with Pagination.</a></p>
<p>ThinkHole labs has some <a href="http://thinkhole.org/wp/2006/01/09/the-youtube-api-and-python/">example YouTube API code for Python users</a>. Apparently using the API can be as simple as passing a dictionary to YouTube&#8217;s XML-RPC interface.</p>
<h2>Code Example</h2>
<p>I&#8217;d written my own code before the Ruby library came out. I want to show it here so you can see how simple writing your own code would be.</p>
<p><pre>
<code>
#!/usr/bin/env ruby
require 'open-uri'

tag = "dancing"
per_page = "100"
def_id = "YOUR_DEV_ID_HERE"
url = "http://www.youtube.com/api2_rest?" \
+ "method=youtube.videos.list_by_tag" \
+ "&#038;tag=#{tag}&#038;per_page=#{per_page}&#038;dev_id=#{dev_id}&#038;page=1"

open(url) do |f|
xml = f.read
end

doc = REXML::Document.new(xml)

elements = doc.root.get_elements("//video")
elements.each do |v|
puts v.get_elements("id").first.get_text.to_s
puts v.get_elements("title").first.get_text.to_s
puts v.get_elements("tags").first.get_text.to_s
puts v.get_elements("thumbnail_url").first.get_text.to_s
end
</code>
</pre>
</p>
<h2>More Info</h2>
<p><a href="http://www.quickonlinetips.com/archives/2006/10/the-amazing-youtube-tools-collection">The Amazing YouTube Tools Collection</a> has a long collection of YouTube tools, mashups, and plugins. </p>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://www.stubbleblog.com/index.php/2006/12/using-the-sales/' title='Using the Salesforce API'>Using the Salesforce API</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2006/11/introduction-to/' title='Introduction to Salesforce AppExchange'>Introduction to Salesforce AppExchange</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2006/09/quotes-on-your/' title='Quotes On Your Phone'>Quotes On Your Phone</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/2011/04/writing-rails-engines-getting-started/' title='Writing Rails Engines #1: Getting Started'>Writing Rails Engines #1: Getting Started</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.stubbleblog.com/index.php/2006/11/youtube-api-how/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Blaine&#8217;s Odeo Extractions</title>
		<link>http://www.stubbleblog.com/index.php/2006/09/blaines-odeo-ex/</link>
		<comments>http://www.stubbleblog.com/index.php/2006/09/blaines-odeo-ex/#comments</comments>
		<pubDate>Mon, 18 Sep 2006 05:18:31 +0000</pubDate>
		<dc:creator>Tony Stubblebine</dc:creator>
				<category><![CDATA[gemjack]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[odeo]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.stubbleblog.com/wp/?p=119</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>I fixed the update mechanism for <a href="http://www.gemjack.com/">gemjack</a> and now you can see two ruby gems that Blaine Cook extracted from the Odeo code base.</p>
<p><a href="http://gemjack.com/gems/FakeWeb-1.1.1/index.html">FakeWeb</a><br />
A test helper that makes it simple to test HTTP interaction</p>
<p><a href="http://gemjack.com/gems/WeightedSelection-1.0.0/index.html">WeightedSelection</a><br />
A simple library for obtaining weighted randomized selections (like for web AB testing perhaps).</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/2009/06/the-real-lessons-from-twitter/' title='The Real Lessons From Twitter'>The Real Lessons From Twitter</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2008/10/my-favorite-podcast-episodes/' title='My Favorite Podcast Episodes'>My Favorite Podcast Episodes</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2007/05/odeo-gets-new-l/' title='Odeo Gets New Life'>Odeo Gets New Life</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2006/11/putting-rails-t/' title='Putting Rails to Work'>Putting Rails to Work</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.stubbleblog.com/index.php/2006/09/blaines-odeo-ex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search Ruby Gem (rdoc) Documentation</title>
		<link>http://www.stubbleblog.com/index.php/2006/05/search-ruby-gem/</link>
		<comments>http://www.stubbleblog.com/index.php/2006/05/search-ruby-gem/#comments</comments>
		<pubDate>Sun, 14 May 2006 18:58:30 +0000</pubDate>
		<dc:creator>Tony Stubblebine</dc:creator>
				<category><![CDATA[documentation]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[rdoc]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.stubbleblog.com/wp/?p=107</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><a href="http://gemjack.com">rdoc documentation for every ruby gem</a></p>
<p>Itch scratched. Now ruby is as good as perl (for me at least). I can&#8217;t make heads or tails of a library module unless I can read the API documentation.</p>
<p>So I put up <a href="http://GemJack.com">GemJack.com</a> as a place to host the rdoc documentation for every ruby gem.  It updates once a day based on polling the ruby gems repository.</p>
<p>Other features like deep search, ratings, comments, RSS feeds, and better meta-data can come later.</p>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://www.stubbleblog.com/index.php/2006/11/putting-rails-t/' title='Putting Rails to Work'>Putting Rails to Work</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/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/09/blaines-odeo-ex/' title='Blaine&#8217;s Odeo Extractions'>Blaine&#8217;s Odeo Extractions</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>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.stubbleblog.com/index.php/2006/05/search-ruby-gem/feed/</wfw:commentRss>
		<slash:comments>3</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>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>Web Startups for Cheap</title>
		<link>http://www.stubbleblog.com/index.php/2005/07/web-startups-fo/</link>
		<comments>http://www.stubbleblog.com/index.php/2005/07/web-startups-fo/#comments</comments>
		<pubDate>Sat, 02 Jul 2005 18:50:33 +0000</pubDate>
		<dc:creator>Tony Stubblebine</dc:creator>
				<category><![CDATA[blogvertising]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[startup]]></category>

		<guid isPermaLink="false">http://www.stubbleblog.com/wp/?p=36</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>I had a nice talk last night with a friend who&#8217;s working on a web startup. I&#8217;m excited for him &#8211; the barrier to entry for starting your own company has plummeted.</p>
<p>Software and software techniques have solidified. An agile, keep it simple, release as soon as you have value development methodology is emerging from the bureaucratic promise everything and deliver crap, marketing driven dot-com mess. There&#8217;s also a much better understanding of how to get and keep users and how to market your company on the cheap.</p>
<p>Here&#8217;s the list of reading material that everyone starting a web company should be familiar with.</p>
<p><b>Ruby</b><br />
Ruby on Rails is a web framework that lets you get web sites out fast. Very fast. And it has all the flexibility and robustness that you hope you&#8217;ll need down the road when your site becomes popular.<br />
<a href="http://www.rubyonrails.com/">www.rubyonrails.com/</a></p>
<p><b>KISS Development</b><br />
Ruby&#8217;s brought to you by 37 Signals, the company behind <a href="http://www.basecamphq.com/">Basecamp</a>. They&#8217;re also on the cutting edge of low overhead development methods. It&#8217;s worth following their blog (although they&#8217;ve watered down their content with generic blog entries).<br />
<a href="http://37signals.com/svn/">37signals.com/svn/</a><br />
<a href="http://37signals.com/svn/archives2/scoble_wonders_if_37signals_is_influencing_microsoft.php">37signals.com/svn/archives2/scoble_wonders_if_37signals_is_influencing_microsoft.php</a><br />
<a href="http://37signals.com/svn/archives2/entrepreneurs_angels_and_the_cost_of_launch.php">37signals.com/svn/archives2/entrepreneurs_angels_and_the_cost_of_launch.php<br />
</a></p>
<p><b>Passion</b><br />
Kathy Sierra, who created O&#8217;Reilly&#8217;s Head First Series, has great writing on what&#8217;s going to make your users enjoy their experience and come back for more.<br />
<a href="http://headrush.typepad.com/creating_passionate_users/">headrush.typepad.com/creating_passionate_users/</a><br />
<a href="http://headrush.typepad.com/creating_passionate_users/2005/06/building_a_succ.html">headrush.typepad.com/creating_passionate_users/2005/06/building_a_succ.html<br />
</a></p>
<p><b>Blogvertising</b><br />
Hugh Macleod&#8217;s blog, <a href="http://gapingvoid.com">gapingvoid.com</a>, teaches blogvertising by example. You think he&#8217;s talking explicitly about blogvertising or maybe making crass commentary on society. Then you realize that you want to buy some <a href="http://www.stormhoek.com/">stormhoek</a> wine and a <a href="http://www.englishcut.com/">english cut</a> $3000 tailored suit. You just got sold to. I&#8217;m still not sure how I feel about that. All I do know is that I want a new suit.<br />
<a href="http://www.gapingvoid.com/">www.gapingvoid.com/</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/2010/11/experiments-in-software-services/' title='Experiments in Software Services'>Experiments in Software Services</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2006/12/using-the-sales/' title='Using the Salesforce API'>Using the Salesforce API</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2006/11/wesabe-launched/' title='Wesabe Launched [updated]'>Wesabe Launched [updated]</a></li>
<li><a href='http://www.stubbleblog.com/index.php/2006/11/putting-rails-t/' title='Putting Rails to Work'>Putting Rails to Work</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.stubbleblog.com/index.php/2005/07/web-startups-fo/feed/</wfw:commentRss>
		<slash:comments>1</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/ruby/feed/ ) in 0.76404 seconds, on Feb 11th, 2012 at 7:49 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 18th, 2012 at 7:49 am UTC -->
