Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3751782
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:07:23+00:00 2026-05-19T09:07:23+00:00

I was working on some project using webrat and cucumber (rails 3), so I

  • 0

I was working on some project using webrat and cucumber (rails 3), so I created a feature with this command

rails g cucumber:feature Requeriment client:string realization:date hour:string shipping_company:string booking:string destiny:string rtype:string

Then my feature is like this

 Scenario: Delete requeriment
    Given the following requeriments:
      |client|realization|hour|shipping_company|booking|destiny|rtype|
      |client 1|20/01/2011|08:30|shipping_company 1|booking 1|destiny 1|rtype 1|
      |client 2|20/01/2011|08:30|shipping_company 2|booking 2|destiny 2|rtype 2|
      |client 3|20/01/2011|08:30|shipping_company 3|booking 3|destiny 3|rtype 3|
      |client 4|20/01/2011|08:30|shipping_company 4|booking 4|destiny 4|rtype 4|
    When I delete the 3rd requeriment
    Then I should see "La orden de servicio fue eliminada exitosamente"
    And I should see the following requeriments:
      |Client|Realization|Hour|Shipping company|Booking|Destiny|Rtype|
      |client 1|20/01/2011|08:30|shipping_company 1|booking 1|destiny 1|rtype 1|
      |client 2|20/01/2011|08:30|shipping_company 2|booking 2|destiny 2|rtype 2|
      |client 4|20/01/2011|08:30|shipping_company 4|booking 4|destiny 4|rtype 4|

When I run it, I get this error message

Using the default profile...
....................F--

(::) failed steps (::)

undefined method `type' for #<Requeriment:0x00000102796938> (ActionView::Template::Error)
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activemodel-3.0.3/lib/active_model/attribute_methods.rb:364:in `method_missing'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.3/lib/active_record/attribute_methods.rb:46:in `method_missing'
./app/views/requeriments/show.html.erb:10:in `_app_views_requeriments_show_html_erb__801476454977741902_2168053700_3071000245049315254'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_view/template.rb:135:in `block in render'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/notifications.rb:52:in `block in instrument'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/notifications.rb:52:in `instrument'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_view/template.rb:127:in `render'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_view/render/rendering.rb:59:in `block in _render_template'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/notifications.rb:52:in `block in instrument'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/notifications.rb:52:in `instrument'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_view/render/rendering.rb:56:in `_render_template'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_view/render/rendering.rb:26:in `render'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/abstract_controller/rendering.rb:114:in `_render_template'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/abstract_controller/rendering.rb:108:in `render_to_body'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/renderers.rb:47:in `render_to_body'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/compatibility.rb:55:in `render_to_body'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/abstract_controller/rendering.rb:101:in `render_to_string'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/abstract_controller/rendering.rb:92:in `render'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/rendering.rb:17:in `render'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/Users/forellana/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/benchmark.rb:309:in `realtime'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/instrumentation.rb:78:in `cleanup_view_runtime'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.3/lib/active_record/railties/controller_runtime.rb:15:in `cleanup_view_runtime'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/instrumentation.rb:39:in `render'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/implicit_render.rb:5:in `send_action'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/abstract_controller/base.rb:151:in `process_action'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/rendering.rb:11:in `process_action'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:435:in `_run__575588255767707561__process_action__2014970349567018671__callbacks'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:409:in `_run_process_action_callbacks'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:93:in `run_callbacks'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/abstract_controller/callbacks.rb:17:in `process_action'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/notifications.rb:52:in `block in instrument'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/notifications.rb:52:in `instrument'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/rescue.rb:17:in `process_action'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/cucumber-rails-0.3.2/lib/cucumber/rails/action_controller.rb:13:in `process_action'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/abstract_controller/base.rb:120:in `process'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/abstract_controller/rendering.rb:40:in `process'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal.rb:138:in `dispatch'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal.rb:178:in `block in action'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/routing/route_set.rb:62:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/routing/route_set.rb:62:in `dispatch'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/routing/route_set.rb:27:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-mount-0.6.13/lib/rack/mount/route_set.rb:148:in `block in call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-mount-0.6.13/lib/rack/mount/code_generation.rb:93:in `block in recognize'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-mount-0.6.13/lib/rack/mount/code_generation.rb:103:in `optimized_each'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-mount-0.6.13/lib/rack/mount/code_generation.rb:92:in `recognize'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-mount-0.6.13/lib/rack/mount/route_set.rb:139:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/routing/route_set.rb:492:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/middleware/head.rb:14:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/methodoverride.rb:24:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/middleware/flash.rb:182:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/middleware/cookies.rb:295:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.3/lib/active_record/query_cache.rb:32:in `block in call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.3/lib/active_record/query_cache.rb:12:in `cache'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.3/lib/active_record/query_cache.rb:31:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:353:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/middleware/callbacks.rb:46:in `block in call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:415:in `_run_call_callbacks'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/middleware/callbacks.rb:44:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/sendfile.rb:107:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/rails/rack/logger.rb:13:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/runtime.rb:17:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/lock.rb:11:in `block in call'
<internal:prelude>:10:in `synchronize'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/lock.rb:11:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/middleware/static.rb:30:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/rails/application.rb:168:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-test-0.5.7/lib/rack/mock_session.rb:30:in `request'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-test-0.5.7/lib/rack/test.rb:209:in `process_request'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-test-0.5.7/lib/rack/test.rb:57:in `get'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/webrat-0.7.3/lib/webrat/core/session.rb:280:in `process_request'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/webrat-0.7.3/lib/webrat/core/session.rb:119:in `request_page'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/webrat-0.7.3/lib/webrat/core/elements/link.rb:20:in `click'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/webrat-0.7.3/lib/webrat/core/scope.rb:276:in `click_link'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/webrat-0.7.3/lib/webrat/core/methods.rb:7:in `click_link'
./features/step_definitions/requeriment_steps.rb:8:in `block (2 levels) in <top (required)>'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/webrat-0.7.3/lib/webrat/core/session.rb:206:in `within'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/webrat-0.7.3/lib/webrat/core/methods.rb:7:in `within'
./features/step_definitions/requeriment_steps.rb:7:in `/^I delete the (\d+)(?:st|nd|rd|th) requeriment$/'
features/manage_requeriments.feature:34:in `When I delete the 3rd requeriment'

Failing Scenarios:
cucumber features/manage_requeriments.feature:27 # Scenario: Delete requeriment

2 scenarios (1 failed, 1 passed)
23 steps (1 failed, 2 skipped, 20 passed)
0m1.263s

But I don’t have defined any type method, I don’t know why webrat is triying to call it

my step definition is here

When /^I delete the (\d+)(?:st|nd|rd|th) requeriment$/ do |pos|
  visit requeriments_path
  within("table tr:nth-child(#{pos.to_i+1})") do
    click_link "Destroy"
  end
end

Can anyone help me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T09:07:24+00:00Added an answer on May 19, 2026 at 9:07 am

    ./app/views/requeriments/show.html.erb line 10 is where the error is. Do you have single-table inheritance? That’s what this smells like.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a project using Windows 2008, .NET 3.5 and WCF for some
I am working with asp.net website project that some of pages need authentication. I
I´m working on a project that basically will show some data collected from hardware
In a PHP project I'm working on we need to create some DAL extensions
I'm working in a project which needs to clean up some third party XSD
I'm working on a project and I want to store some easily enumerated information
I'm working on a school project and I'm getting some weird errors from Xcode.
On a recent project I have been working on in C#/ASP.NET I have some
I'm working on an embedded C project that depends on some external HW. I
My friend is working on a project in which he needs to get some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.