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

  • SEARCH
  • Home
  • 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 8188347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:52:47+00:00 2026-06-07T02:52:47+00:00

I have the following Cucumber scenario: Scenario: find vegetable with same color Given I

  • 0

I have the following Cucumber scenario:

Scenario: find vegetable with same color
  Given I am on the details page for "Potato"

Since I’m able to piggy back off a web_step:

Given /^(?:|I )am on (.+)$/ do |page_name|
  visit path_to(page_name)
end

All I have to do is and to the paths.rb file which I did:

def path_to(page_name)
  case page_name

  when /^the edit page for "(.*)"$/
    edit_vegetable_path(Vegetable.find_by_name($1))
  when /^the details page for "(.*)"$/
    vegetable_path(Vegetable.find_by_title($1))

However, once I run cucumber, I get the following error:

Given I am on the details page for "Potato"              # features/step_definitions/web_steps.rb:44
      undefined method `strftime' for nil:NilClass (ActionView::Template::Error)
      /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.1.0/lib/active_support/whiny_nil.rb:48:in `method_missing'
      ./app/views/vegetables/show.html.haml:14:in `_app_views_vegetables_show_html_haml___295190995_93073700'
      /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.1.0/lib/action_view/template.rb:144:in `block in render'
      /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.1.0/lib/active_support/notifications.rb:55:in `instrument'
      /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.1.0/lib/action_view/template.rb:142:in `render'

etc…

I’m not sure why edit_vegetable_path works, but vegetable_path doesn’t. I even tried hard-coding a particular vegetable page (just as a test) and I got the same error:

when /^the details page for "(.*)"$/
    '/vegetables/1'

I have no idea how to further debug this issue at this point. Any assistance will be appreciated.

  • 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-06-07T02:52:48+00:00Added an answer on June 7, 2026 at 2:52 am

    I found out that there was an issue with my view file. Once I made the change, everything worked out.

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

Sidebar

Related Questions

I have a Cucumber scenario with the following step: Given /^I have logged in$/
I'm using Devise for user Authentication and have the following failing Cucumber scenario: Scenario:
I'm new to cucumber and I have the following scenario: Then I should see
I'm using following construct in a cucumber step definition. Given I have following stuff
I have following div in a page (I can not modify). <div id=:0.control>Click me</div>
Using scenario outlines in SpecFlow, e.g. Scenario Outline: Invalid Login Details Given some pre-conditions...
I'm getting started with cucumber, and I have written the following step definition, which
I'm using cucumber-watir-webdriver with for automation purposes. I have the following directory structure: |features
I have the following part of a step definition: page.should have_content Contraseña o Email
I have three listBoxes: listBox1 have the following items: Fruit and vegetable. listBox2 have

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.