Table of Contents 6.1 Iteration A1: Getting Something Running
Expected at least 1 element matching "th", found 0. Traceback: /home/rubys/git/awdwr/checkdepot.rb:50:in `block in <class:DepotTest>'
ls -p
app/ config.ru doc/ lib/ public/ README test/ vendor/
config/ db/ Gemfile log/ Rakefile script/ tmp/
rails generate scaffold product title:string description:text image_url:string
invoke active_record
create db/migrate/20100505161040_create_products.rb
create app/models/product.rb
invoke test_unit
create test/unit/product_test.rb
create test/fixtures/products.yml
route resources :products
invoke scaffold_controller
create app/controllers/products_controller.rb
invoke erb
create app/views/products
create app/views/products/index.html.erb
create app/views/products/edit.html.erb
create app/views/products/show.html.erb
create app/views/products/new.html.erb
create app/views/products/_form.html.erb
invoke test_unit
create test/functional/products_controller_test.rb
invoke helper
create app/helpers/products_helper.rb
invoke test_unit
create test/unit/helpers/products_helper_test.rb
invoke stylesheets
create public/stylesheets/scaffold.css
rake db:migrate
mv 20100505161040_create_products.rb 20100301000001_create_products.rb
(in /home/rubys/git/awdwr/work-191/depot)
== CreateProducts: migrating =================================================
-- create_table(:products)
-> 0.0020s
== CreateProducts: migrated (0.0021s) ========================================
sqlite3> select version from schema_migrations
version = 20100301000001
edit app/views/products/_form.html.erb
<%= form_for(@product) do |f| %>
<% if @product.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@product.errors.count, "error") %> prohibited this product from being saved:</h2>
<ul>
<% @product.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :title %><br />
<%= f.text_field :title %>
</div>
<div class="field">
<%= f.label :description %><br />
<%= f.text_area :description, :rows => 6 %>
</div>
<div class="field">
<%= f.label :image_url %><br />
<%= f.text_field :image_url %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>
get /products
#<EOFError: end of file reached> /home/rubys/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/net/protocol.rb:135:in `sysread' /home/rubys/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/net/protocol.rb:135:in `block in rbuf_fill' /home/rubys/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/timeout.rb:52:in `timeout' /home/rubys/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/timeout.rb:82:in `timeout' /home/rubys/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/net/protocol.rb:134:in `rbuf_fill' /home/rubys/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/net/protocol.rb:116:in `readuntil' /home/rubys/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/net/protocol.rb:126:in `readline' /home/rubys/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/net/http.rb:2136:in `read_status_line' /home/rubys/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/net/http.rb:2125:in `read_new' /home/rubys/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/net/http.rb:1117:in `transport_request' /home/rubys/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/net/http.rb:1103:in `request' /home/rubys/git/gorp/lib/gorp/net.rb:100:in `block in post' /home/rubys/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/net/http.rb:564:in `start' /home/rubys/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/net/http.rb:453:in `start' /home/rubys/git/gorp/lib/gorp/net.rb:92:in `post' /home/rubys/git/gorp/lib/gorp/net.rb:79:in `get' makedepot.rb:61:in `block in <main>' /home/rubys/git/gorp/lib/gorp/output.rb:59:in `call' /home/rubys/git/gorp/lib/gorp/output.rb:59:in `block (4 levels) in <top (required)>' /home/rubys/git/gorp/lib/gorp/output.rb:49:in `each' /home/rubys/git/gorp/lib/gorp/output.rb:49:in `block (3 levels) in <top (required)>' /home/rubys/.rvm/gems/ruby-1.9.1-p378/gems/builder-2.1.2/lib/builder/xmlbase.rb:134:in `call' /home/rubys/.rvm/gems/ruby-1.9.1-p378/gems/builder-2.1.2/lib/builder/xmlbase.rb:134:in `_nested_structures' /home/rubys/.rvm/gems/ruby-1.9.1-p378/gems/builder-2.1.2/lib/builder/xmlbase.rb:58:in `method_missing' /home/rubys/git/gorp/lib/gorp/output.rb:22:in `block (2 levels) in <top (required)>' /home/rubys/.rvm/gems/ruby-1.9.1-p378/gems/builder-2.1.2/lib/builder/xmlbase.rb:134:in `call' /home/rubys/.rvm/gems/ruby-1.9.1-p378/gems/builder-2.1.2/lib/builder/xmlbase.rb:134:in `_nested_structures' /home/rubys/.rvm/gems/ruby-1.9.1-p378/gems/builder-2.1.2/lib/builder/xmlbase.rb:58:in `method_missing' /home/rubys/git/gorp/lib/gorp/output.rb:11:in `block in <top (required)>'
Table of Contents 6.1 Iteration A1: Getting Something Running