6.3 Iteration A2: Add a Missing Column 6.1 Iteration A1: Getting Something Running
</^7 tests, 10 assertions, 0 failures, 0 errors/> expected but was <"app/\t config.ru doc/ Gemfile.lock log/ Rakefile script/ tmp/">. Traceback: /home/rubys/git/awdwr/checkdepot.rb:54:in `block in <class:DepotTest>'
ls -p
app/ config.ru doc/ Gemfile.lock log/ Rakefile script/ tmp/
config/ db/ Gemfile lib/ public/ README test/ vendor/
rails generate scaffold product title:string description:text image_url:string
/home/rubys/.rvm/gems/ruby-1.9.3-r28929/gems/bundler-1.0.0.rc.3/lib/bundler.rb:183: Use RbConfig instead of obsolete and deprecated Config.
invoke active_record
create db/migrate/20100808162110_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 20100808162110_create_products.rb 20100301000001_create_products.rb
/home/rubys/.rvm/gems/ruby-1.9.3-r28929/gems/bundler-1.0.0.rc.3/lib/bundler.rb:183: Use RbConfig instead of obsolete and deprecated Config.
(in /home/rubys/git/awdwr/work-193/depot)
== CreateProducts: migrating =================================================
-- create_table(:products)
-> 0.0016s
== CreateProducts: migrated (0.0017s) ========================================
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
get /products/new
post /products
get http://localhost:3000/products/1
Product was successfully created.
Title: Pragmatic Version Control
Description: <p> This book is a recipe-based approach to using Subversion that will get you up and running quickly---and correctly. All projects need version control: it's a foundational piece of any project's infrastructure. Yet half of all project teams in the U.S. dont use any version control at all. Many others dont use it well, and end up experiencing time-consuming problems. </p>
Image url: /images/svn.jpg
Edit | Backget /products
Title | Description | Image url | |||
---|---|---|---|---|---|
Pragmatic Version Control | <p> This book is a recipe-based approach to using Subversion that will get you up and running quickly---and correctly. All projects need version control: it's a foundational piece of any project's infrastructure. Yet half of all project teams in the U.S. dont use any version control at all. Many others dont use it well, and end up experiencing time-consuming problems. </p> | /images/svn.jpg | Show | Edit | Destroy |
sqlite3 db/development.sqlite3 .schema
CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "description" text, "image_url" varchar(255), "created_at" datetime, "updated_at" datetime);
CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL);
CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version");
rake test
/home/rubys/.rvm/gems/ruby-1.9.3-r28929/gems/bundler-1.0.0.rc.3/lib/bundler.rb:183: Use RbConfig instead of obsolete and deprecated Config.
(in /home/rubys/git/awdwr/work-193/depot)
/home/rubys/.rvm/gems/ruby-1.9.3-r28929/gems/bundler-1.0.0.rc.3/lib/bundler.rb:183: Use RbConfig instead of obsolete and deprecated Config.
/home/rubys/git/rails/activesupport/lib/active_support/testing/declarative.rb:28:in `test': test_the_truth is already defined in ProductTest (RuntimeError)
from /home/rubys/git/awdwr/work-193/depot/test/unit/product_test.rb:5:in `<class:ProductTest>'
from /home/rubys/git/awdwr/work-193/depot/test/unit/product_test.rb:3:in `<top (required)>'
from /home/rubys/git/rails/activesupport/lib/active_support/dependencies.rb:219:in `require'
from /home/rubys/git/rails/activesupport/lib/active_support/dependencies.rb:219:in `block in require'
from /home/rubys/git/rails/activesupport/lib/active_support/dependencies.rb:207:in `load_dependency'
from /home/rubys/git/rails/activesupport/lib/active_support/dependencies.rb:219:in `require'
from /home/rubys/.rvm/rubies/ruby-1.9.3-r28929/lib/ruby/1.9.1/test/unit.rb:79:in `block in non_options'
from /home/rubys/.rvm/rubies/ruby-1.9.3-r28929/lib/ruby/1.9.1/test/unit.rb:73:in `each'
from /home/rubys/.rvm/rubies/ruby-1.9.3-r28929/lib/ruby/1.9.1/test/unit.rb:73:in `non_options'
from /home/rubys/.rvm/rubies/ruby-1.9.3-r28929/lib/ruby/1.9.1/test/unit.rb:45:in `process_args'
from /home/rubys/.rvm/rubies/ruby-1.9.3-r28929/lib/ruby/1.9.1/minitest/unit.rb:576:in `run'
from /home/rubys/.rvm/rubies/ruby-1.9.3-r28929/lib/ruby/1.9.1/test/unit.rb:21:in `run'
from /home/rubys/.rvm/rubies/ruby-1.9.3-r28929/lib/ruby/1.9.1/test/unit.rb:163:in `block (2 levels) in autorun'
from /home/rubys/.rvm/rubies/ruby-1.9.3-r28929/lib/ruby/1.9.1/test/unit.rb:27:in `run_once'
from /home/rubys/.rvm/rubies/ruby-1.9.3-r28929/lib/ruby/1.9.1/test/unit.rb:163:in `block in autorun'
/home/rubys/.rvm/gems/ruby-1.9.3-r28929/gems/bundler-1.0.0.rc.3/lib/bundler.rb:183: Use RbConfig instead of obsolete and deprecated Config.
/home/rubys/git/rails/activesupport/lib/active_support/testing/declarative.rb:28:in `test': test_should_get_index is already defined in ProductsControllerTest (RuntimeError)
from /home/rubys/git/awdwr/work-193/depot/test/functional/products_controller_test.rb:8:in `<class:ProductsControllerTest>'
from /home/rubys/git/awdwr/work-193/depot/test/functional/products_controller_test.rb:3:in `<top (required)>'
from /home/rubys/git/rails/activesupport/lib/active_support/dependencies.rb:219:in `require'
from /home/rubys/git/rails/activesupport/lib/active_support/dependencies.rb:219:in `block in require'
from /home/rubys/git/rails/activesupport/lib/active_support/dependencies.rb:207:in `load_dependency'
from /home/rubys/git/rails/activesupport/lib/active_support/dependencies.rb:219:in `require'
from /home/rubys/.rvm/rubies/ruby-1.9.3-r28929/lib/ruby/1.9.1/test/unit.rb:79:in `block in non_options'
from /home/rubys/.rvm/rubies/ruby-1.9.3-r28929/lib/ruby/1.9.1/test/unit.rb:73:in `each'
from /home/rubys/.rvm/rubies/ruby-1.9.3-r28929/lib/ruby/1.9.1/test/unit.rb:73:in `non_options'
from /home/rubys/.rvm/rubies/ruby-1.9.3-r28929/lib/ruby/1.9.1/test/unit.rb:45:in `process_args'
from /home/rubys/.rvm/rubies/ruby-1.9.3-r28929/lib/ruby/1.9.1/minitest/unit.rb:576:in `run'
from /home/rubys/.rvm/rubies/ruby-1.9.3-r28929/lib/ruby/1.9.1/test/unit.rb:21:in `run'
from /home/rubys/.rvm/rubies/ruby-1.9.3-r28929/lib/ruby/1.9.1/test/unit.rb:163:in `block (2 levels) in autorun'
from /home/rubys/.rvm/rubies/ruby-1.9.3-r28929/lib/ruby/1.9.1/test/unit.rb:27:in `run_once'
from /home/rubys/.rvm/rubies/ruby-1.9.3-r28929/lib/ruby/1.9.1/test/unit.rb:163:in `block in autorun'
/home/rubys/.rvm/gems/ruby-1.9.3-r28929/gems/bundler-1.0.0.rc.3/lib/bundler.rb:183: Use RbConfig instead of obsolete and deprecated Config.
Errors running test:units, test:functionals!
6.3 Iteration A2: Add a Missing Column 6.1 Iteration A1: Getting Something Running