0

I am trying to automate a WPF using Bewildr, cucumber and IronRuby. As of now, as a baby step I have done the following

Installed IronRuby1.1 in C:\IronRuby Installed Bewildr and cucumber gem

Created a Ruby file in IronRuby bin sample.rb

require 'rubygems'    
require 'bewildr'    
@app, @main_window = Bewildr::Application.start_app_and_wait_for_window("C:\\Documents and Settings\\321106\\Desktop\\ExpenseItStandalone.exe", /App v1.\d+/)

When i execute it in cmd prompt using

ruby sample.rb

I get the following error:

C:/Ruby193/lib/ruby/gems/1.9.1/gems/bewildr-0.1.14/lib/bewildr.rb:7:in `<top (required)>': Bewildr only works under IronRuby (LoadError)
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
        from adding_steps.rb:3:in `<main>'
Pritesh Jain
  • 9,106
  • 4
  • 37
  • 51
user1395264
  • 143
  • 3
  • 18

1 Answers1

1

You are trying to run bewildr in plain ruby. You need to use IronRuby. Instead of:

ruby sample.rb

Try:

ir sample.rb
j0k
  • 22,600
  • 28
  • 79
  • 90
  • I realised the ir.exe was in a different path. Now ir.exe and the program reside in the same folder but I still get an error like this unknown: no such file to load -- gem_prelude.rb (LoadError) – user1395264 Sep 18 '12 at 09:45
  • Now a new error: >>> require 'minitest' C:/Program Files/IronRuby 1.1/Lib/ruby/1.9.1/rubygems/custom_require.rb:29:in `r equire': no such file to load -- minitest (LoadError)fromC:/Program Files/IronRuby1.1/Lib/ruby/1.9.1/rubygems/custom_require.rb:29:in `require' from (ir):1 – user1395264 Sep 24 '12 at 05:33