title: How to trace fail scenario in cucumber for test environment?
body: <pre><code>RAILS_ENV=test bundle exec cucumber features/bodybuilder/notworking.feature --backtrace
  </code></pre>
  
  <p>I have used the above command with different parameter but no success for me <br/>
  1. --backtrace<br/>
  2. --format (OptionParser::MissingArgument) &lt;== it gives me this <br/>
  3. --verbose --backtrace  &lt;== this does not show correct way of output<br/>
  4. --trace (OptionParser::InvalidOption) &lt;== it gives me this <br/></p>
  
  <p>It does not give me where Scenario fails exactly <br/></p>
  
  <p>o/p: for backtrace <br/></p>
  
  <blockquote>
    <p>fatal: Not a git repository (or any of the parent directories):
    .git<br/> fatal: Not a git repository (or any of the parent
    directories): .git<br/> fatal: Not a git repository (or any of the
    parent directories): .git<br/> fatal: Not a git repository (or any of
    the parent directories): .git<br/> re-use db:
    dxbi_2f921362a97c1_725257_test<br/> Using the default profile...<br/>
    .........F<br/></p>
    
    <p>Failing Scenarios:<br/> cucumber
    features/bodybuilder/notworking.feature:19 # Scenario: Create new
    bodybuilder<br/></p>
    
    <p>1 scenario (1 failed)<br/> 6 steps (6 passed)<br/> 0m11.148s<br/></p>
  </blockquote>
  
  <p>The Scenario using:</p>
  
  <blockquote>
    <p>@javascript<br/>
    Scenario: Create new bodybuilder<br/>
    &nbsp;&nbsp;&nbsp;&nbsp;When I click on Create New bodybuilder button<br/>
    &nbsp;&nbsp;&nbsp;&nbsp;Then I check the checkbox "MobileClick" from bodybuilder gym<br/>
    &nbsp;&nbsp;&nbsp;&nbsp;And  I fill in "Name" with "bodybuilderTest"<br/>
    &nbsp;&nbsp;&nbsp;&nbsp;And  I click on "Create bodybuilder" button<br/>
    &nbsp;&nbsp;&nbsp;&nbsp;Then I should see "Successfully created bodybuilder 'bodybuilderTest'"<br/></p>
  </blockquote>
  
  <p>The step gives us problem is this:</p>
  
  <blockquote>
    <p>When(/^I check the checkbox "(.*?)" from bodybuilder gym$/) do |checkbox_select|<br/>
    &nbsp;&nbsp;&nbsp;within('div#first_party_bodybilder_table') do<br/>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if find("span", :text => "#{checkbox_select}")<br/>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;find('td.selectable input').click<br/>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end<br/>
    &nbsp;&nbsp;&nbsp;end<br/>
    end<br/></p>
  </blockquote>
  
  <p>Here after clicking it gives that ...F over there else Scenario runs smooth but we need that to check.</p>