Help needed guys....

98 views
Skip to first unread message

Praveen@Test

unread,
Sep 17, 2011, 8:10:21 AM9/17/11
to Cukes
I am very new to cucumber and started learning things by myself. Can
anyone suggest me a solution for my problem? Or please correct me if I
am doing wrong.

I am running Windows XP.

I have copied some files from net and tried executing. It gives the
following error. I have created the "features" folder under C:\cucumber
\test. This is to search something on Google. I have included those
two files at the bottom.

Error message (copied from command window)
--------------------------------------------------------------------
C:\cucumber\test>cucumber
cannot link Java class gherkin.TagExpression, probable missing
dependency: Bad version number in .class file
args: [[]] (NameError)
org/jruby/javasupport/JavaUtilities.java:54:in
`get_proxy_or_package_under_package'
c:/jruby-1.6.3/lib/ruby/site_ruby/shared/builtin/javasupport/java.rb:
51:in `method_missing'
org/jruby/RubyKernel.java:2092:in `send'
c:/jruby-1.6.3/lib/ruby/gems/1.8/gems/gherkin-2.4.18-java/lib/gherkin/
native/java.rb:72:in `java_class'
c:/jruby-1.6.3/lib/ruby/gems/1.8/gems/gherkin-2.4.18-java/lib/gherkin/
native/java.rb:51:in `new'
c:/jruby-1.6.3/lib/ruby/gems/1.8/gems/cucumber-1.0.6/bin/../lib/
cucumber/cli/configuration.rb:29:in `parse!'
c:/jruby-1.6.3/lib/ruby/gems/1.8/gems/cucumber-1.0.6/bin/../lib/
cucumber/cli/main.rb:54:in `configuration'
c:/jruby-1.6.3/lib/ruby/gems/1.8/gems/cucumber-1.0.6/bin/../lib/
cucumber/cli/main.rb:62:in `run_drb_client'
c:/jruby-1.6.3/lib/ruby/gems/1.8/gems/cucumber-1.0.6/bin/../lib/
cucumber/cli/main.rb:34:in `execute!'
c:/jruby-1.6.3/lib/ruby/gems/1.8/gems/cucumber-1.0.6/bin/../lib/
cucumber/cli/main.rb:20:in `execute'
c:/jruby-1.6.3/lib/ruby/gems/1.8/gems/cucumber-1.0.6/bin/cucumber:
14:in `(root)'
org/jruby/RubyKernel.java:1063:in `load'
c:\jruby-1.6.3\bin\cucumber:19:in `(root)'

C:\cucumber\test\features\step_definitions\example_steps.rb
-----------------------------------------------------------------------------------------

require "watir-webdriver"
require "rspec/expectations"

Given /^I have entered "([^"]*)" into the query$/ do |term|
@browser ||= Watir::Browser.new :firefox
@browser.goto "google.com"
@browser.text_field(:name => "q").set term
end

When /^I click "([^"]*)"$/ do |button_name|
@browser.button.click
end

Then /^I should see some results$/ do
@browser.div(:id => "resultStats").wait_until_present
@browser.div(:id => "resultStats").should exist
@browser.close
end

C:\cucumber\test\features\example.feature
-------------------------------------------------------------
Feature: Search
In order to use Google users must
be able to search for content

Scenario: Search for a term
Given I have entered "watir" into the query
When I click "search"
Then I should see some results

Thanks in advance

aslak hellesoy

unread,
Sep 17, 2011, 8:23:17 AM9/17/11
to cu...@googlegroups.com
On Sat, Sep 17, 2011 at 1:10 PM, Praveen@Test <praveen...@gmail.com> wrote:
I am very new to cucumber and started learning things by myself. Can
anyone suggest me a solution for my problem? Or please correct me if I
am doing wrong.

I am running Windows XP.


The error is from within JRuby, so I suggest you ask on the JRuby mailing list if anyone know what causes it.

Have you tried with regular Ruby? http://rubyinstaller.org/

Aslak
 

--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cu...@googlegroups.com.
To unsubscribe from this group, send email to cukes+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.


samt

unread,
Sep 22, 2011, 2:41:54 PM9/22/11
to Cukes
Hi Aslak,

I got the same error as noted, however removed cucumber-1.0.6 (plus
dependencies) and re-installed with cucumber-0.9.4 and this resolved
the error.

jruby: 1.6.4
java version "1.6.0_27"

Looks (maybe) like gherkin-2.4.21-java was causing the error.

Sam

On Sep 17, 1:23 pm, aslak hellesoy <aslak.helle...@gmail.com> wrote:
> On Sat, Sep 17, 2011 at 1:10 PM, Praveen@Test <praveen.pras...@gmail.com>wrote:
>
> > I am very new to cucumber and started learning things by myself. Can
> > anyone suggest me a solution for my problem? Or please correct me if I
> > am doing wrong.
>
> > I am running Windows XP.
>
> The error is from within JRuby, so I suggest you ask on the JRuby mailing
> list if anyone know what causes it.
>
> Have you tried with regular Ruby?http://rubyinstaller.org/
Reply all
Reply to author
Forward
0 new messages