<?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>Sarah Mei &#187; rails</title>
	<atom:link href="http://www.sarahmei.com/blog/tag/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sarahmei.com/blog</link>
	<description></description>
	<lastBuildDate>Sun, 22 Jan 2012 20:16:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>CruiseControl.rb and RubyGems 1.5.2</title>
		<link>http://www.sarahmei.com/blog/2011/02/26/cruisecontrol-rb-and-rubygems-1-5-2/</link>
		<comments>http://www.sarahmei.com/blog/2011/02/26/cruisecontrol-rb-and-rubygems-1-5-2/#comments</comments>
		<pubDate>Sat, 26 Feb 2011 18:57:32 +0000</pubDate>
		<dc:creator>sarahmei</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[bundler]]></category>
		<category><![CDATA[ccrb]]></category>
		<category><![CDATA[diaspora]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rails2]]></category>
		<category><![CDATA[rails3]]></category>
		<category><![CDATA[rubygems]]></category>

		<guid isPermaLink="false">http://www.sarahmei.com/blog/?p=931</guid>
		<description><![CDATA[Diaspora uses CruiseControl.rb to run our continuous integration server. CC.rb is on Rails 2.3, but the applications it&#8217;s building are on Rails 3, which means I occasionally run into &#8230; weirdness. Last week, for example, I wanted to speed up our builds by upgrading Bundler to 1.0.10 and RubyGems to 1.5.2. Because of the new [...]]]></description>
			<content:encoded><![CDATA[<p>Diaspora uses <a href="https://github.com/thoughtworks/cruisecontrol.rb" target="_blank">CruiseControl.rb</a> to run our <a href="http://ci.joindiaspora.com" target="_blank">continuous integration server</a>. CC.rb is on Rails 2.3, but the applications it&#8217;s building are on Rails 3, which means I occasionally run into &#8230; weirdness.</p>
<p>Last week, for example, I wanted to speed up our builds by upgrading <a href="http://gembundler.com/" target="_blank">Bundler</a> to 1.0.10 and <a href="http://rubygems.org/" target="_blank">RubyGems</a> to 1.5.2. Because of the new partial caching of the dependency graph, the upgrades shaved two whole minutes off the build locally, and I wanted to get that on CI.<br />
<span id="more-931"></span><br />
Trouble is, once I did the upgrades, I got this upon restarting CC.rb:</p>
<p><script src="https://gist.github.com/845478.js?file=gistfile1.eclass"></script></p>
<p>It turns out that older versions of Rails 2.3 <a href="http://www.redmine.org/issues/7516" target="_blank">aren&#8217;t compatible</a> with the new version of RubyGems. To fix this, I added the following to CC.rb&#8217;s <code>config/environment.rb</code>, between the definition of <code>ABSOLUTE_RAILS_ROOT</code> and the <code>Rails::Initializer</code> block.</p>
<p><script src="https://gist.github.com/845481.js?file=gistfile1.rb"></script> </p>
<p>Both the 1.8 and 1.9 builds are now about 2 minutes faster which is awesome. Highly recommend the upgrades.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sarahmei.com/blog/2011/02/26/cruisecontrol-rb-and-rubygems-1-5-2/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>RailsConf Slides &#8211; Beyond (No)SQL</title>
		<link>http://www.sarahmei.com/blog/2010/06/09/railsconf-slides/</link>
		<comments>http://www.sarahmei.com/blog/2010/06/09/railsconf-slides/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 16:26:54 +0000</pubDate>
		<dc:creator>sarahmei</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[nosql]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[railsconf]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.sarahmei.com/blog/?p=544</guid>
		<description><![CDATA[Preliminary slides for my RailsConf talk I&#8217;m giving this afternoon on conceptual tools for evaluating databases. Contains some profanity at the beginning. Slides are subject to change since I haven&#8217;t actually given the talk yet! Beyond (No)SQL View more presentations from Sarah Mei.]]></description>
			<content:encoded><![CDATA[<p>Preliminary slides for my RailsConf talk I&#8217;m giving this afternoon on conceptual tools for evaluating databases. <strong>Contains some profanity at the beginning.</strong> Slides are subject to change since I haven&#8217;t actually given the talk yet!<br />
<span id="more-544"></span></p>
<div style="width:425px" id="__ss_4453924"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/sarahmei/beyond-nosql" title="Beyond (No)SQL">Beyond (No)SQL</a></strong><object id="__sse4453924" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=beyond-no-sql-100609112040-phpapp02&#038;stripped_title=beyond-nosql" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse4453924" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=beyond-no-sql-100609112040-phpapp02&#038;stripped_title=beyond-nosql" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/sarahmei">Sarah Mei</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sarahmei.com/blog/2010/06/09/railsconf-slides/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Outside-In BDD: How?!</title>
		<link>http://www.sarahmei.com/blog/2010/05/29/outside-in-bdd/</link>
		<comments>http://www.sarahmei.com/blog/2010/05/29/outside-in-bdd/#comments</comments>
		<pubDate>Sun, 30 May 2010 03:14:55 +0000</pubDate>
		<dc:creator>sarahmei</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[bdd]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rspec]]></category>

		<guid isPermaLink="false">http://www.sarahmei.com/blog/?p=443</guid>
		<description><![CDATA[I use rspec on every project, and I&#8217;ve started adding cucumber to all my projects in the last few months. There&#8217;s lots of information out there about how to set up and use cucumber, but there isn&#8217;t much covering your developer workflow when you&#8217;re using these tools. How do you start, and how do you [...]]]></description>
			<content:encoded><![CDATA[<p>I use <a href="http://rspec.info/">rspec</a> on every project, and I&#8217;ve started adding <a href="http://cukes.info">cucumber</a> to all my projects in the last few months. There&#8217;s lots of information out there about how to set up and use cucumber, but there isn&#8217;t much covering your developer workflow when you&#8217;re using these tools.</p>
<p>How do you start, and how do you know you&#8217;re finished? What do you test, and where? These questions can be answered hundreds of different ways, but here&#8217;s my way.<br />
<span id="more-443"></span></p>
<h2>The first code I write: a feature</h2>
<p>As a developer, rather than a designer, I&#8217;m always tempted to start with unit tests and work out towards a cucumber feature (&#8220;inside-out&#8221; testing). But that approach gets me into no end of trouble. I usually end up writing and testing stuff on the model that I don&#8217;t ultimately need. Plus once I&#8217;m down in the weeds coding, I lose track of the big picture.</p>
<p>So I like to do outside-in testing instead. I start each story I get from <a href="http://pivotaltracker.com">tracker</a> with a cucumber feature that expresses how the PM will be able to accept it when I&#8217;m done. The feature helps me frame the problem properly, and focus on doing exactly what I need to make it work. Since I come back to it periodically while I&#8217;m coding, I keep focused on the higher-level goal. And finally &#8211; if I write it first, I can&#8217;t skip writing it once I&#8217;m done.</p>
<h2>Before we get going&#8230;</h2>
<p>There are certain types of tests I don&#8217;t write in this example (and in some cases, at all). Let&#8217;s get those out of the way so you don&#8217;t have to come up with a scathing comment at the bottom of the post.</p>
<ul>
<li><strong>Model tests.</strong> In this example, my model doesn&#8217;t do anything other than default ActiveRecord behavior, so it doesn&#8217;t need any tests. <strong>Don&#8217;t test rails internals.</strong> Once my model has custom behavior, it will have specs, too.</li>
<li><strong>View tests.</strong> I have no tests that verify that my markup is what I expect. That&#8217;s because they&#8217;re a waste of time. Yes, even with complex views. Verify behavior with cucumber tests, unit-test Javascript with <a href="http://github.com/pivotal/jasmine">jasmine</a>, and leave the rest to the humans. You&#8217;ll waste more developer time maintaining them than it would take humans to verify them. Verifiers are a whole lot cheaper than developers.</li>
<li><strong>Error case tests.</strong> In this example, there are no error cases. The model has no validations, and the table has no constraints. Once there are error cases, I generally put those in the model if I can, in the controller when I have to, and never in the cucumber tests. The latter is mostly a suite-speed consideration &#8211; cucumber tests run much more slowly than rspec. Cucumber&#8217;s great for for happy path tests; I leave the rest to rspec.</li>
</ul>
<p>Let&#8217;s get going!</p>
<h2>The first feature</h2>
<p>Say I&#8217;m doing a library app and the first story is &#8220;User can enter a new book into the system.&#8221; Before I write any other code, I write this feature:</p>
<pre lang="RUBY">
Feature: User manages books
  Scenario: User adds a new book
    Given I go to the new book page
    And I fill in "Name" with "War &#038; Peace"
    And I fill in "Description" with "Long Russian novel"
    When I press "Create"
    Then I should be on the book list page
    And I should see "War &#038; Peace"
</pre>
<h2>Starting the fail-fix cycle</h2>
<p>I run it using <code>cucumber features</code>, and it fails on the first line &#8211; <code>Given I go to the new book page</code> &#8211; because cucumber doesn&#8217;t know where the &#8220;new book page&#8221; is. So I add that to the cucumber paths helper.</p>
<pre lang="RUBY">
    when /the new book page/
      new_book_path
</pre>
<p>Now when I run cucumber, it fails because it can&#8217;t find <code>new_book_path</code>. So I add that to <code>routes.rb</code>:</p>
<pre lang="RUBY">
  map.resources :books, <img src='http://www.sarahmei.com/blog/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> nly => [:new]
</pre>
<p>Now when I run cucumber, it complains that it can&#8217;t find the BooksController. That means it&#8217;s time to dive down to rspec controller tests. </p>
<h2>My first spec experience</h2>
<p>I create <code>books_controller_spec.rb</code> in spec/controllers, and add a test for the <code>new</code> method:</p>
<pre lang="RUBY">
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper.rb'))
describe BooksController do
  describe "#new" do
    it "should be successful" do
      get :new
      response.should be_success
    end
  end
end
</pre>
<p>When I run this spec, it complains that there is no BooksController. Fixed:</p>
<pre lang="RUBY">
class BooksController < ApplicationController
end
</pre>
<p></code><br />
I re-run the spec and get "no action responded to new." So I add the <code>new</code> method.</p>
<pre lang="RUBY">
class BooksController < ApplicationController
  def new
  end
end
</pre>
<p>Now the spec passes! Time to check back with cucumber.</p>
<h2>Getting past the first line</h2>
<p>I read through my cucumber feature again:</p>
<pre lang="RUBY">
Feature: User manages books
  Scenario: User adds a new book
    Given I go to the new book page
    And I fill in "Name" with "War &#038; Peace"
    And I fill in "Description" with "Long Russian novel"
    When I press "Create"
    Then I should be on the book list page
    And I should see "War &#038; Peace"
</pre>
<p>Last time I ran it, it failed on the first line because it couldn't find the BooksController. This time, same location, but it says it can't find the view. So whiny! To placate it, I create an empty view called <code>new.html.erb</code> and run it again.</p>
<p>Now cucumber gets past line 1 (huzzah!!) and fails on line 2 (<code>And I fill in "Name" with "War &amp; Peace"</code>) with the message that it can't find a field called Name to fill in. So I add a standard rails form to the view.</p>
<pre lang="RUBY">
<%- form_for @book do |f| -%>
    <%= f.label :name %>
    <%= f.text_field :name %>
    <%= f.label :description %>
    <%= f.text_area :description %>
    <%= f.submit "Create" %>
<%- end -%>
</pre>
<p>Uh oh. Cucumber is mad at me because there is no <code>@book</code> object. Back to rspec for me!</p>
<h2>rspec: The Return</h2>
<p>In my controller's <code>new</code> method, I need to create a book object that the form will use. I first add a test for that in the controller spec:</p>
<pre lang="RUBY">
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper.rb'))
describe BooksController do
  describe "#new" do
    before do
      get :new
    end
    it "should be successful" do
      response.should be_success
    end
    it "should create a book object" do
      assigns(:book).should_not be_nil
    end
  end
end
</pre>
<p>This fails the right way - it says assigns(:book) is nil. So then I add the creation of the book object to the controller.</p>
<pre lang="RUBY">
class BooksController < ApplicationController
  def new
    @book = Book.new
  end
end
</pre>
<p>Now the spec fails, saying it can't find the Book class. It has a point - I haven't created the model yet. Fixed:</p>
<pre lang="RUBY">
class Book < ActiveRecord::Base
end
</pre>
<p>Now it fails saying it can't find the books table. So I write a migration that creates that.</p>
<pre lang="RUBY">
class CreateBooksTable < ActiveRecord::Migration
  def self.up
    create_table :books do |t|
      t.string :name
      t.text :description
    end
  end
  def self.down
    drop_table :books
  end
end
</pre>
<p>Once I do <code>rake db:migrate</code> and <code>rake db:test:prepare</code>, I re-run my controller spec....and it passes! Back to the cucumber feature!</p>
<h2>Cucumber...again.</h2>
<p>In our last episode, cucumber was visibly annoyed because there was no <code>@book</code> object for the form to operate on. I run it again to see if it's still sulking.</p>
<p>Yep. This time it tells me that it can't find books_path. <code>form_for</code> tries to submit to the create path by default, which I haven't added yet. I add it to the routes.</p>
<pre lang="RUBY">
  map.resources :books, <img src='http://www.sarahmei.com/blog/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> nly => [:new, :create]
</pre>
<p>This time, when I run cucumber, it gets through the first three lines (woo hoo!) and fails on the 4th, saying no action responded to create. Back to the rspec-cave, batman!</p>
<h2>rspec: The Sequel to The Return</h2>
<p>I add a controller spec for the <code>create</code> method.</p>
<pre lang="RUBY">
  describe "#create" do
    it "should create a new book" do
      post :create, "book" => {"name" => "Jane Eyre", "description" => "Something Victorian"}
      assigns(:book).should_not be_nil
      assigns(:book).name.should == "Jane Eyre"
    end
  end
</pre>
<p>When I run it, I get the same message as in cucumber: no action responded to create. So I create the create:</p>
<pre lang="RUBY">
class BooksController < ApplicationController
  def new
    @book = Book.new
  end
  def create
  end
end
</pre>
<p>Now when I re-run the spec, it fails saying that assigns(:book) is nil, which makes sense. I put in the guts of <code>create</code> to make that pass.</p>
<pre lang="RUBY">
  def create
    @book = Book.new(params[:book])
    @book.save
  end
</pre>
<p>Now rspec passes! Back to cucumber. </p>
<h2>So...cucumber. We meet again.</h2>
<p>When I re-run the feature, it says I'm missing a template for create, which is correct. However, in this case, I don't want to make a template for create - I want to redirect to the book list page. So once again, I'm back with rspec.</p>
<h2>rspec: Back so soon?</h2>
<p>I add that expectation to the controller spec for <code>create</code>.</p>
<pre lang="RUBY">
    it "should redirect to the book list page" do
      response.should redirect_to books_path
    end
</pre>
<p>It fails saying there's no redirect. So to make it pass, I add a redirect to the controller code.</p>
<pre lang="RUBY">
  def create
    @book = Book.new(params[:book])
    if @book.save
      redirect_to books_path
    end
  end
</pre>
<p>Now my controller specs pass. Cucumber, I'm coming for you!</p>
<h2>Oh, you again.</h2>
<p>Last time, we got through the first 3 lines of the feature and failed on line 4 (<code>When I press "Create"</code>). When I run it this time, it gets through the same 3 lines and then fails in the same place again, saying that no action responded to index. I add <code>index</code> to the routes.</p>
<pre lang="RUBY">
  map.resources :books, <img src='http://www.sarahmei.com/blog/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> nly => [:new, :create, :index]
</pre>
<p>I re-run the feature and get the same error message. WTF, cucumber?! It turns out that rails' implementation of REST uses the same path helper for create and index, so the path helper for <code>index</code> already exists, even though the method does not. A little strange, I know. But we need an <code>index</code> method, so it's back to rspec.</p>
<h2>rspec: For the first time, for the last time...</h2>
<p>I write a spec for the <code>index</code> method.</p>
<pre lang="RUBY">
  describe "#index" do
    it "should be successful" do
      get :index
      response.should be_success
    end
  end
</pre>
<p>I still get no action responded to index. So l add the method in BooksController, empty to start.</p>
<pre lang="RUBY">
  def index
  end
</pre>
<p>Specs pass, back to cucumber!</p>
<h2>How can I miss you if you won't go away?</h2>
<p>Cucumber tells me there's no template for index. So I create an empty one, and re-run. This run, for the first time, I pass line 4 (yaaaaay) but then it fails on line 5 (<code>Then I should be on the book list page</code>) because it can't figure out what I mean by "the book list page." That goes in the cucumber path helper.</p>
<pre lang="RUBY">
    when /the book list page/
      books_path
</pre>
<p>OMG five out of six steps pass! Now cucumber says it can't find "War &amp; Peace" on the page, so let's make the index view list the existing books. Back to rspec...</p>
<h2>Don't go away mad...just go away.</h2>
<p>I add the following <code>it</code> block to the spec for <code>index</code>.</p>
<pre lang="RUBY">
    it "should assign a list of existing books" do
      Book.create!(:name => "Endymion", :description => "weird")
      get :index
      assigns(:books).should_not be_nil
      assigns(:books).length.should == 1
    end
</pre>
<p>It fails because I'm not creating @books in the controller, so I fix that.</p>
<pre lang="RUBY">
  def index
    @books = Book.all
  end
</pre>
<p>Now the specs pass - back to cucumber. </p>
<h2>We really have to stop seeing each other like this.</h2>
<p>Cucumber still says it can't find War &amp; Peace, because I haven't added printing out the books to the index view. I'll fix that.</p>
<pre lang="RUBY">
<%- @books.each do |book| -%>
    <strong><%= h book.name %></strong>
    <%= h book.description %>
<%- end -%>
</pre>
<p>Re-run cucumber and ... ta-da! The feature passes! I've done everything I need to call the story done. I have the minimum amount of code I need, because all the code I wrote was driven by the feature. Story: <strong>delivered</strong>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sarahmei.com/blog/2010/05/29/outside-in-bdd/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>The First 2010 Ruby Outreach Workshop</title>
		<link>http://www.sarahmei.com/blog/2010/02/19/the-first-2010-ruby-outreach-workshop/</link>
		<comments>http://www.sarahmei.com/blog/2010/02/19/the-first-2010-ruby-outreach-workshop/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 17:37:54 +0000</pubDate>
		<dc:creator>sarahmei</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[childcare]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[sfruby]]></category>
		<category><![CDATA[workshops]]></category>

		<guid isPermaLink="false">http://www.sarahmei.com/blog/?p=301</guid>
		<description><![CDATA[&#8230;is now open for registration. Last year Sarah Allen and I did three workshops for women and this year we&#8217;re going for four. So, if you&#8217;d like to learn Rails and can come BOTH Friday, February 26th in the evening AND Saturday, February 27th during the day, go sign up! There are only a few [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_171" class="wp-caption alignright" style="width: 210px"><img src="http://www.sarahmei.com/blog/wp-content/uploads/2009/07/ruby.jpg" alt="Copyright 2006 by Yukihiro Matsumoto" title="ruby" width="200" class="size-full wp-image-171" /><p class="wp-caption-text">LEARN ME</p></div>
<p>&#8230;is now <a href="http://www.meetup.com/sfruby/calendar/12605445/">open for registration</a>.  Last year <a href="http://ultrasaurus.com">Sarah Allen</a> and I did three workshops for women and this year we&#8217;re going for four.  So, if you&#8217;d like to learn Rails and can come BOTH Friday, February 26th in the evening AND Saturday, February 27th during the day, <a href="http://www.meetup.com/sfruby/calendar/12605445/">go sign up</a>! There are only a few spots left.</p>
<p>And yep, still free.</p>
<p>We&#8217;re also seeking Rails developers (of any gender) to assist as TAs. <a href="http://www.meetup.com/sfruby/calendar/12605400/">Tell us about that here</a>.  Past TAs and teachers have found it quite rewarding. Plus you get a drink ticket for the afterparty. <img src='http://www.sarahmei.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>And finally, some logistics: it&#8217;ll be in an office space in downtown San Francisco, near transit. Next week we&#8217;ll send out the exact address. We&#8217;ll have informal childcare and space for pumping or nursing &#8211; please tell us if you think you&#8217;ll be using those services when you register.</p>
<p>See you there! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sarahmei.com/blog/2010/02/19/the-first-2010-ruby-outreach-workshop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>August Workshop Dates Confirmed!</title>
		<link>http://www.sarahmei.com/blog/2009/06/28/august-workshop-dates-confirmed/</link>
		<comments>http://www.sarahmei.com/blog/2009/06/28/august-workshop-dates-confirmed/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 23:06:29 +0000</pubDate>
		<dc:creator>sarahmei</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[pivotal]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[sfruby]]></category>
		<category><![CDATA[workshops]]></category>

		<guid isPermaLink="false">http://www.sarahmei.com/blog/?p=145</guid>
		<description><![CDATA[Pivotal Labs will be hosting our next workshop on July 31st and August 1st &#8211; that&#8217;s Friday evening and Saturday all day. The format will be similar to our first workshop: Friday night is a mixer and installfest. Attendees bring their laptops, and, with the help of our volunteers, install anything they&#8217;re missing to run [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://pivotallabs.com/">Pivotal Labs</a> will be hosting our next workshop on <strong>July 31st and August 1st</strong> &#8211; that&#8217;s Friday evening and Saturday all day.</p>
<p>The format will be similar to our first workshop: Friday night is a mixer and installfest. Attendees bring their laptops, and, with the help of our volunteers, install anything they&#8217;re missing to run Rails. Saturday is the workshop itself, starting with a short general presentation at 10am. Then we&#8217;ll break into smaller groups for the workshop itself. Lunch is included, and child care and nursing/pumping space is available.</p>
<p>If you came to the first workshop, you&#8217;re welcome to return for this one! Newcomers are likewise encouraged to register. When you register, you&#8217;ll be asked to answer some questions that will help us figure out how to allocate the class space we have.</p>
<p>The June event generated some great word-of-mouth, so I&#8217;m expecting this one to fill up quickly once registration is open. To find out when you can register, watch this space, check out the new site <a href="http://sfrubyworkshops.com">sfrubyworkshops.com</a>, and join the low-traffic announcement-only mailing list (hosted by Google):</p>
<table style="padding: 5px; background-color: #ffffff;" border="0" cellspacing="0">
<form action="http://groups.google.com/group/sf-ruby-workshop-announce/boxsubscribe">
<tbody>
<tr>
<td style="padding-left: 5px;">Email address:</td>
<td style="padding-left: 5px;">
<input name="email" type="text" />
<input name="sub" type="submit" value="Subscribe" /></td>
</tr>
</tbody>
</form>
</table>
<p>Lastly, we&#8217;re looking for sponsors to help us make this event fantastic. If your company or organization would like to assist, please email rubyworkshop at gmail dot com, which goes to both me and Sarah Allen.</p>
<p>UPDATE: The fine folks at <a href="http://www.engineyard.com/">Engine Yard</a> are buying lunch. Thanks EY!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sarahmei.com/blog/2009/06/28/august-workshop-dates-confirmed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The First Rails Workshop</title>
		<link>http://www.sarahmei.com/blog/2009/06/14/the-first-rails-workshop/</link>
		<comments>http://www.sarahmei.com/blog/2009/06/14/the-first-rails-workshop/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 02:35:23 +0000</pubDate>
		<dc:creator>sarahmei</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[devchix]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[railsbridge]]></category>
		<category><![CDATA[sfruby]]></category>
		<category><![CDATA[workshops]]></category>

		<guid isPermaLink="false">http://www.sarahmei.com/blog/?p=109</guid>
		<description><![CDATA[Two months ago, Sarah Allen and I started planning a Ruby on Rails outreach workshop for women. Our goal: each participant leaves with a fully-functional development environment, a working application, and some space online to show off their work. As we got into it we realized it was really, really ambitious. But I am profoundly [...]]]></description>
			<content:encoded><![CDATA[<p>Two months ago, <a title="Sarah Allen" href="http://www.ultrasaurus.com">Sarah Allen</a> and I started planning a <a href="http://www.meetup.com/sfruby/calendar/10377288/">Ruby on Rails outreach workshop</a> for women. Our goal: each participant leaves with a fully-functional development environment, a working application, and some space online to show off their work.</p>
<p>As we got into it we realized it was really, really ambitious. But I am profoundly thrilled to report that the SF Ruby community came together this weekend and <strong>made it happen</strong>.</p>
<p style="text-align: center;">
<div id="attachment_110" class="wp-caption aligncenter" style="width: 650px"><img class="size-full wp-image-110" title="workshop-bosco-so" src="http://www.sarahmei.com/blog/wp-content/uploads/2009/06/workshop-bosco.jpg" alt="O HAI NEW RAILS PPL" width="640" height="480" /><p class="wp-caption-text">O HAI NEW RAILS PPL</p></div>
<p>It was really, really incredible. More than 60 people spent their Friday evening installing Rails. Then <em>they came back</em> on Saturday and learned how to use it. A lot of them had never programmed before, but now they have <a href="http://github.com">Github</a> accounts and a URL on <a href="http://heroku.com">Heroku</a>. Watch out world!</p>
<p>I&#8217;ll be following up in this space with more lessons learned (and some further events), but for now, I want to share some feedback we got last night from one of the participants:</p>
<blockquote><p>In addition to learning way more than I expected, I enjoyed the tone of the entire weekend. It was the only attitude-free, newbie-safe and mama-friendly tech event I have ever attended.</p></blockquote>
<p>There were lots of things I could have organized better &#8211; projectors, class allocations, installation instructions &#8211; but I&#8217;m really happy that these folks got to experience a bit of the Ruby <a href="http://on-ruby.blogspot.com/2008/03/gracious-dave-and-minswan.html">MINASWAN</a>. In fact, I think something just got in my eye. *sniff*</p>
<p>So a million thanks to our sponsors, our volunteers, and the entire SF Ruby community for making this happen. Seriously. You ROCK.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sarahmei.com/blog/2009/06/14/the-first-rails-workshop/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Heroku on Windows</title>
		<link>http://www.sarahmei.com/blog/2009/05/24/using-heroku-on-windows/</link>
		<comments>http://www.sarahmei.com/blog/2009/05/24/using-heroku-on-windows/#comments</comments>
		<pubDate>Mon, 25 May 2009 06:37:01 +0000</pubDate>
		<dc:creator>sarahmei</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[heroku]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[workshops]]></category>

		<guid isPermaLink="false">http://www.sarahmei.com/blog/?p=92</guid>
		<description><![CDATA[Next month, 80 people with laptops are going to show up and expect me to teach them something about Rails. I want them to see the app they&#8217;re writing on the web, but I only have six hours in the workshop (including lunch!) and deployment could easily take that much time by itself. Apache and [...]]]></description>
			<content:encoded><![CDATA[<p>Next month, 80 people with laptops are going to show up and expect me to <a href="http://www.meetup.com/sfruby/calendar/10377288/">teach them something about Rails</a>. I want them to see the app they&#8217;re writing on the web, but I only have six hours in the workshop (including lunch!) and deployment could easily take that much time by itself. Apache and nginx and Passenger and Capistrano and memcached and&#8230;yeah. These are beginners.</p>
<p>So I&#8217;m super stoked about <a href="http://heroku.com">Heroku</a>, who&#8217;s come to put the easy into Rails deployment. Register, install the gem, and deploying &#8211; with a real URL and everything &#8211; is as easy as <code>git push heroku</code>.</p>
<p>Sounds great! But it turns out that using the Heroku client on Windows <a href="http://groups.google.com/group/heroku/browse_thread/thread/59053cd0f593a775/c8d4e1ebffafb5c6?lnk=gst#c8d4e1ebffafb5c6">is</a> <a href="http://groups.google.com/group/heroku/browse_thread/thread/7e96d84ba0193484">slightly</a> <a href="http://groups.google.com/group/heroku/browse_thread/thread/3480e0f2a55be760/944c811616162be6?lnk=gst#944c811616162be6">problematic</a>. With the standard Rails crowd, I wouldn&#8217;t worry, but it looks like about half the attendees will bring some flavor of Windows. So my choices were either make it work on Windows, or scrap the idea of, you know, putting apps on the internet.<br />
<span id="more-92"></span><br />
So I fixed it. It turned out to be relatively straightforward. The shell method, which takes a command and returns its output, was doing this:</p>
<p><code>`cd '#{Dir.pwd}' &#038;&#038; #{cmd}`</code></p>
<p>Windows thinks <code>'</code> is a perfectly good character for directory names, so all calls to shell in Windows generated this error:</p>
<p><code>The filename, directory name, or volume label syntax is incorrect.</code></p>
<p>How helpful. In any case, it won&#8217;t be doing that anymore. My changes are <a href="http://github.com/sarahmei/heroku/tree/master">up on github</a>, and I&#8217;ve sent the official heroku client a pull request.</p>
<p>The client still has two spec failures on Windows (running within MsysGit&#8217;s Git Bash) that are unrelated to this change, and actually represent fairly significant cross-platform challenges.</p>
<p><code><br />
'Heroku::Command::Auth sets ~/.heroku/credentials to be readable only by the user' FAILED<br />
expected: 16832,<br />
     got: 16877 (using ==)<br />
./spec/commands/auth_spec.rb:49:<br />
</code></p>
<p>The client fails to chmod your credentials file to user-only read, because File.chmod doesn&#8217;t do anything. As I&#8217;m sure you&#8217;re aware, there are <a href="http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/AccessControls.html">significant differences</a> between POSIX-style file permissions and Windows ACLs (access control lists). </p>
<p>So your credentials file, which has your Heroku username and password in plaintext, may be readable by other users. This generally isn&#8217;t as much of an issue on Windows as it is on *nix but it&#8217;s something to be aware of. You may want to adjust the ACLs by hand if you&#8217;re on a multi-user system.</p>
<p><code><br />
NotImplementedError in 'Heroku::Command::App Git Integration before(:all)'<br />
fork() function is unimplemented on this machine<br />
./spec/commands/app_spec.rb:103:<br />
</code></p>
<p>Yep, as the error message suggests, <code>Kernel::fork</code> is not implemented in Windows Ruby. The Heroku client does not use fork &#8211; it&#8217;s in one of the gems, Session, which is used by Rush, which the Heroku test framework uses to create a sandbox git installation.</p>
<p>I haven&#8217;t looked too extensively at this one, but it might be possible to rewrite it to work on Windows. Rush does have some code specific to Windows, and there are alternate ways to sandbox the git install as well.</p>
<p>So given that neither of these failures affects the functioning of the client, I&#8217;m confident it&#8217;ll be usable on everyone&#8217;s laptop. I&#8217;m also super excited that one of the Heroku engineers, Pedro, has volunteered to help out with installation at the workshop! </p>
<p>We&#8217;re still looking for other volunteers &#8211; if you&#8217;re interested please email ruby workshop at gmail dot com.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sarahmei.com/blog/2009/05/24/using-heroku-on-windows/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>My drop in the bucket</title>
		<link>http://www.sarahmei.com/blog/2009/05/04/my-drop-in-the-bucket/</link>
		<comments>http://www.sarahmei.com/blog/2009/05/04/my-drop-in-the-bucket/#comments</comments>
		<pubDate>Mon, 04 May 2009 14:37:52 +0000</pubDate>
		<dc:creator>sarahmei</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[devchix]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[railsbridge]]></category>
		<category><![CDATA[sfruby]]></category>

		<guid isPermaLink="false">http://www.sarahmei.com/blog/?p=75</guid>
		<description><![CDATA[Since I got into computer science in college, I&#8217;ve spent a lot of time thinking and talking and reading about the gender imbalance in computing. I&#8217;ve decided it&#8217;s time for me to help fix the problem. So I&#8217;ll be offering a free workshop in San Francisco to reach out to women who want to learn [...]]]></description>
			<content:encoded><![CDATA[<p>Since I got into computer science in college, I&#8217;ve spent a lot of time thinking and talking and reading about the gender imbalance in computing. I&#8217;ve decided it&#8217;s time for me to help fix the problem.</p>
<p>So I&#8217;ll be offering a free workshop in San Francisco to reach out to women who want to learn Ruby and Rails. <a href="http://www.ultrasaurus.com/sarahblog/2009/04/baby-steps-and-bold-moves/">Sarah Allen</a> and I are spearheading with the assistance of the <a href="http://www.meetup.com/sfruby/">San Francisco Ruby Meetup</a> and <a href="http://www.devchix.com">Devchix </a>and (your org here?). </p>
<p>The first one is June 12th and 13th &#8211; Friday night is a mixer and installfest, then Saturday is the workshop and hacking space. We&#8217;ll go from nothing to a fully-operational web application on the internet (mwa ha haaa!). </p>
<p>Registration will be open next week &#8211; check back for details then. </p>
<p>I&#8217;m posting this today, though, because <a href="http://railsbridge.org">RailsBridge</a>, a grassroots effort to make the Rails community welcoming to everyone, is launching today. We&#8217;ll be releasing the slides, talking points, and logistics info for these workshops (oh yes, there will be more) under their umbrella. </p>
<p>Now, I&#8217;m a developer, not a trainer or an event planner, but&#8230;they&#8217;re all nails, right? And Github is a mighty fine hammer. Fork the kit and use it to your own ends. Maybe, if I&#8217;m feeling generous, I&#8217;ll merge you back in. But my goal is to have a continuously updated presentation that any Rails developer can pick up and use to run a similar event in their city.</p>
<p>Want to help? Maybe you actually know something about how to run a workshop like this? Get in touch and let&#8217;s talk.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sarahmei.com/blog/2009/05/04/my-drop-in-the-bucket/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

