Ruby on rails 黄瓜找不到桌子;但是它';在那里。发生了什么事?

Ruby on rails 黄瓜找不到桌子;但是它';在那里。发生了什么事?,ruby-on-rails,cucumber,Ruby On Rails,Cucumber,我和cucumber一起工作,遇到了困难。当我运行“cucumber features”时,我遇到了错误,cucumber无法找到我的请求表。我犯了什么明显的错误 提前谢谢你 Bash: justin-zollarss-mac-pro:conversion justinz$ cucumber features Using the default profile... /Users/justinz/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/gem_depen

我和cucumber一起工作,遇到了困难。当我运行“cucumber features”时,我遇到了错误,cucumber无法找到我的请求表。我犯了什么明显的错误

提前谢谢你

Bash:

justin-zollarss-mac-pro:conversion justinz$ cucumber features
Using the default profile...
/Users/justinz/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement
F--

(::) failed steps (::)

Could not find table 'requests' (ActiveRecord::StatementInvalid)
./features/article_steps.rb:3
./features/article_steps.rb:2:in `each'
./features/article_steps.rb:2:in `/^I have requests named (.+)$/'
features/manage_articles.feature:7:in `Given I have requests named Foo, Bar'

Failing Scenarios:
cucumber features/manage_articles.feature:6 # Scenario: Conversion

1 scenario (1 failed)
3 steps (1 failed, 2 skipped)
0m0.154s
justin-zollarss-mac-pro:conversion justinz$ 
Feature: Manage Articles
    In order to make sales
    As a customer
    I want to make conversions

Scenario: Conversion
    Given I have requests named Foo, Bar
    When I go to the list of customers
    Then I should see a new "customer"
Given /^I have requests named (.+)$/ do |firsts|
   firsts.split(', ').each do |first|
      Request.create!(:first => first)
  pending # express the regexp above with the code you wish you had
end
end


Then /^I should see a new "([^"]*)"$/ do |arg1|
  pending # express the regexp above with the code you wish you had
end
ActiveRecord::Schema.define(:version => 20100528011731) do

  create_table "requests", :force => true do |t|
    t.string   "institution"
    t.string   "website"
    t.string   "type"
    t.string   "users"
    t.string   "first"
    t.string   "last"
    t.string   "jobtitle"
    t.string   "phone"
    t.string   "email"
    t.datetime "created_at"
    t.datetime "updated_at"
  end end
管理文章。功能:

justin-zollarss-mac-pro:conversion justinz$ cucumber features
Using the default profile...
/Users/justinz/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement
F--

(::) failed steps (::)

Could not find table 'requests' (ActiveRecord::StatementInvalid)
./features/article_steps.rb:3
./features/article_steps.rb:2:in `each'
./features/article_steps.rb:2:in `/^I have requests named (.+)$/'
features/manage_articles.feature:7:in `Given I have requests named Foo, Bar'

Failing Scenarios:
cucumber features/manage_articles.feature:6 # Scenario: Conversion

1 scenario (1 failed)
3 steps (1 failed, 2 skipped)
0m0.154s
justin-zollarss-mac-pro:conversion justinz$ 
Feature: Manage Articles
    In order to make sales
    As a customer
    I want to make conversions

Scenario: Conversion
    Given I have requests named Foo, Bar
    When I go to the list of customers
    Then I should see a new "customer"
Given /^I have requests named (.+)$/ do |firsts|
   firsts.split(', ').each do |first|
      Request.create!(:first => first)
  pending # express the regexp above with the code you wish you had
end
end


Then /^I should see a new "([^"]*)"$/ do |arg1|
  pending # express the regexp above with the code you wish you had
end
ActiveRecord::Schema.define(:version => 20100528011731) do

  create_table "requests", :force => true do |t|
    t.string   "institution"
    t.string   "website"
    t.string   "type"
    t.string   "users"
    t.string   "first"
    t.string   "last"
    t.string   "jobtitle"
    t.string   "phone"
    t.string   "email"
    t.datetime "created_at"
    t.datetime "updated_at"
  end end
文章\u步骤。rb:

justin-zollarss-mac-pro:conversion justinz$ cucumber features
Using the default profile...
/Users/justinz/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement
F--

(::) failed steps (::)

Could not find table 'requests' (ActiveRecord::StatementInvalid)
./features/article_steps.rb:3
./features/article_steps.rb:2:in `each'
./features/article_steps.rb:2:in `/^I have requests named (.+)$/'
features/manage_articles.feature:7:in `Given I have requests named Foo, Bar'

Failing Scenarios:
cucumber features/manage_articles.feature:6 # Scenario: Conversion

1 scenario (1 failed)
3 steps (1 failed, 2 skipped)
0m0.154s
justin-zollarss-mac-pro:conversion justinz$ 
Feature: Manage Articles
    In order to make sales
    As a customer
    I want to make conversions

Scenario: Conversion
    Given I have requests named Foo, Bar
    When I go to the list of customers
    Then I should see a new "customer"
Given /^I have requests named (.+)$/ do |firsts|
   firsts.split(', ').each do |first|
      Request.create!(:first => first)
  pending # express the regexp above with the code you wish you had
end
end


Then /^I should see a new "([^"]*)"$/ do |arg1|
  pending # express the regexp above with the code you wish you had
end
ActiveRecord::Schema.define(:version => 20100528011731) do

  create_table "requests", :force => true do |t|
    t.string   "institution"
    t.string   "website"
    t.string   "type"
    t.string   "users"
    t.string   "first"
    t.string   "last"
    t.string   "jobtitle"
    t.string   "phone"
    t.string   "email"
    t.datetime "created_at"
    t.datetime "updated_at"
  end end
DB模式:

justin-zollarss-mac-pro:conversion justinz$ cucumber features
Using the default profile...
/Users/justinz/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement
F--

(::) failed steps (::)

Could not find table 'requests' (ActiveRecord::StatementInvalid)
./features/article_steps.rb:3
./features/article_steps.rb:2:in `each'
./features/article_steps.rb:2:in `/^I have requests named (.+)$/'
features/manage_articles.feature:7:in `Given I have requests named Foo, Bar'

Failing Scenarios:
cucumber features/manage_articles.feature:6 # Scenario: Conversion

1 scenario (1 failed)
3 steps (1 failed, 2 skipped)
0m0.154s
justin-zollarss-mac-pro:conversion justinz$ 
Feature: Manage Articles
    In order to make sales
    As a customer
    I want to make conversions

Scenario: Conversion
    Given I have requests named Foo, Bar
    When I go to the list of customers
    Then I should see a new "customer"
Given /^I have requests named (.+)$/ do |firsts|
   firsts.split(', ').each do |first|
      Request.create!(:first => first)
  pending # express the regexp above with the code you wish you had
end
end


Then /^I should see a new "([^"]*)"$/ do |arg1|
  pending # express the regexp above with the code you wish you had
end
ActiveRecord::Schema.define(:version => 20100528011731) do

  create_table "requests", :force => true do |t|
    t.string   "institution"
    t.string   "website"
    t.string   "type"
    t.string   "users"
    t.string   "first"
    t.string   "last"
    t.string   "jobtitle"
    t.string   "phone"
    t.string   "email"
    t.datetime "created_at"
    t.datetime "updated_at"
  end end

你在Test/Cug环境中运行你的迁移吗?

事实上,为了使你的环境正常,你可以考虑通过RealEngReCord::迁移器.MigRead('Db/MigReave/')在每个黄瓜上运行数据库来清除数据库。