使用beuldr执行IronRuby时出错
我正在尝试使用beuldr、cucumber和IronRuby自动化WPF。 到目前为止,作为一个婴儿步骤,我已经做了以下工作 在C:\IronRuby中安装了IronRuby1.1 安装了beuldr和cucumber gem 在IronRuby bin中创建了一个Ruby文件 sample.rb使用beuldr执行IronRuby时出错,ruby,ironruby,Ruby,Ironruby,我正在尝试使用beuldr、cucumber和IronRuby自动化WPF。 到目前为止,作为一个婴儿步骤,我已经做了以下工作 在C:\IronRuby中安装了IronRuby1.1 安装了beuldr和cucumber gem 在IronRuby bin中创建了一个Ruby文件 sample.rb require 'rubygems' require 'bewildr' @app, @main_window = Bewildr::Application.start_app_an
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+/)
当我在cmd提示符下使用
ruby sample.rb
我得到以下错误:
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>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/beuldr-0.1.14/lib/beuldr.rb:7:in`':beuldr仅在IronRuby下工作(LoadError)
来自C:/Ruby193/lib/ruby/site\u ruby/1.9.1/rubygems/custom\u require.rb:60:in'require'
来自C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in“rescue in require”
来自C:/Ruby193/lib/ruby/site\u ruby/1.9.1/rubygems/custom\u require.rb:35:in'require'
从添加步骤。rb:3:in`'
您正试图在纯ruby中运行Bevildr。你需要使用IronRuby。而不是:
ruby sample.rb
尝试:
我意识到ir.exe的路径不同。现在ir.exe和程序位于同一个文件夹中,但我仍然得到这样一个未知错误:没有这样的文件要加载--gem_prelude.rb(LoadError)现在一个新错误:>>>require'minitest'C:/program Files/IronRuby 1.1/Lib/ruby/1.9.1/rubygems/custom_require.rb:29:in
r equire:没有这样的文件要加载---minitest(LoadError)fromC:/Program Files/IronRuby1.1/Lib/ruby/1.9.1/rubygems/custom_require.rb:29:in
require'from(ir):1
ir sample.rb