Skip to content

Instantly share code, notes, and snippets.

@kofno
Created March 4, 2009 16:17
Show Gist options
  • Save kofno/73890 to your computer and use it in GitHub Desktop.
Save kofno/73890 to your computer and use it in GitHub Desktop.
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.gsub (NoMethodError)
/home/ryan/opt/jruby-1.1.6/lib/ruby/gems/1.8/gems/webrat-0.4.2/lib/webrat/core/locators/link_locator.rb:52:in `replace_nbsp_ref'
/home/ryan/opt/jruby-1.1.6/lib/ruby/gems/1.8/gems/webrat-0.4.2/lib/webrat/core/locators/link_locator.rb:30:in `matches_text?'
/home/ryan/opt/jruby-1.1.6/lib/ruby/gems/1.8/gems/webrat-0.4.2/lib/webrat/core/locators/link_locator.rb:18:in `matching_links'
/home/ryan/opt/jruby-1.1.6/lib/ruby/gems/1.8/gems/webrat-0.4.2/lib/webrat/core/locators/link_locator.rb:17:in `select'
/home/ryan/opt/jruby-1.1.6/lib/ruby/gems/1.8/gems/webrat-0.4.2/lib/webrat/core/locators/link_locator.rb:17:in `matching_links'
/home/ryan/opt/jruby-1.1.6/lib/ruby/gems/1.8/gems/webrat-0.4.2/lib/webrat/core/locators/link_locator.rb:13:in `link_element'
/home/ryan/opt/jruby-1.1.6/lib/ruby/gems/1.8/gems/webrat-0.4.2/lib/webrat/core/locators/link_locator.rb:9:in `locate'
/home/ryan/opt/jruby-1.1.6/lib/ruby/gems/1.8/gems/webrat-0.4.2/lib/webrat/core/locators/locator.rb:14:in `locate!'
/home/ryan/opt/jruby-1.1.6/lib/ruby/gems/1.8/gems/webrat-0.4.2/lib/webrat/core/locators/link_locator.rb:62:in `find_link'
/home/ryan/opt/jruby-1.1.6/lib/ruby/gems/1.8/gems/webrat-0.4.2/lib/webrat/core/scope.rb:260:in `click_link'
(eval):2:in `click_link'
features/step_definitions/contact_to_morbidity_steps.rb:27:in `When /^I promote Jones to a morbidity event$/'
features/contact_to_morbidity.feature:39:in `When I promote Jones to a morbidity event'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment