Gem net/ping in ruby - ruby

I just install net/ping gem and I want to do this program:
require 'net/ping'
good = 'www.google.com'
bad = 'foo.bar.baz'
p1 = Net::Ping::TCP.new(good, 'http')
p p1.ping?
p2 = Net::Ping::TCP.new(bad)
p p2.ping?
The problem is when I try to run it. The system show this:
C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- win32/security (LoadError)
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/net-ping-1.7.7/lib/net/ping/icmp.rb:4:in `<top (required)>'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/net-ping-1.7.7/lib/net/ping.rb:9:in `require_relative'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/net-ping-1.7.7/lib/net/ping.rb:9:in `<top (required)>'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from C:/Users/Ildefonso7/Desktop/tcp.rb:4:in `<main>'
What happen???

Related

Can't run ruby script with required tumblr_client

Can't run ruby script with required tumblr_client. Installed gem 'tumblr_client', but I got an error:
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/faraday-0.9.2/lib/faraday/options.rb:153:in `new': tried to create Proc object without a block (ArgumentError)
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/faraday-0.9.2/lib/faraday/options.rb:153:in `memoized'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/faraday-0.9.2/lib/faraday/options.rb:234:in `<class:ProxyOptions>'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/faraday-0.9.2/lib/faraday/options.rb:216:in `<module:Faraday>'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/faraday-0.9.2/lib/faraday/options.rb:1:in `<top (required)>'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:148:in `require'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:148:in `require'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/faraday-0.9.2/lib/faraday.rb:80:in `block in require_libs'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/faraday-0.9.2/lib/faraday.rb:79:in `each'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/faraday-0.9.2/lib/faraday.rb:79:in `require_libs'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/faraday-0.9.2/lib/faraday.rb:240:in `<module:Faraday>'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/faraday-0.9.2/lib/faraday.rb:16:in `<top (required)>'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:96:in `require'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:96:in `require'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/tumblr_client-0.8.5/lib/tumblr/connection.rb:1:in `<top (required)>'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:96:in `require'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:96:in `require'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/tumblr_client-0.8.5/lib/tumblr/client.rb:4:in `<top (required)>'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:96:in `require'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:96:in `require'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/tumblr_client-0.8.5/lib/tumblr_client.rb:1:in `<top (required)>'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:160:in `require'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:160:in `rescue in require'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:149:in `require'
from 1.rb:2:in `<main>'
<internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- tumblr_client (LoadError)
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from 1.rb:2:in `<main>'
Script source code:
require 'tumblr_client'
require 'json'
client = Tumblr::Client.new({
:consumer_key => 'bla-bla',
:consumer_secret => 'bla-bla',
:oauth_token => 'bla-bla',
:oauth_token_secret => 'bla-bla'
})
res = client.queue("dystopia-arts-girls.tumblr.com", {:limit => 20, :offset => 0})
File.open('result.json', 'w'){ |file| file.write res.to_json }
The trouble was in 'faraday' and version of 'tumblr_client'
How I did repair it:
> gem install specific_install
> gem specific_install https://github.com/tumblr/tumblr_client
Also I uninstall old versions of faraday and faraday_middleware

How to authorize to spotify with Ruby + RestClient

I need to authorize and parse some data from my account.
When I try to accest authorize link im getting a set of error which I dont know how to handle.
require 'json'
require 'watir'
require 'bundler'
require 'rest-client'
#redirect_uri = ""
CLIENT_ID= "xxxxxxxxxxxxxxxxxxxxxxxxxxx"
puts(RestClient.get 'https://accounts.spotify.com/authorize?client_id=%s' % [CLIENT_ID])
OUTPUT:
C:\Ruby30-x64\bin\ruby.exe C:/Users/Lil-Dredd/RubymineProjects/untitled/main.rb
<internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/mime-types-2.99.3/lib/mime/types/logger.rb:26: _1 is reserved for numbered parameter (SyntaxError)
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/mime-types-2.99.3/lib/mime/types/logger.rb:26: _2 is reserved for numbered parameter
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/mime-types-2.99.3/lib/mime/types/logger.rb:26: _3 is reserved for numbered parameter
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/mime-types-2.99.3/lib/mime/types/deprecations.rb:3:in `<top (required)>'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/mime-types-2.99.3/lib/mime/types.rb:3:in `<top (required)>'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/mime-types-2.99.3/lib/mime/types/columnar.rb:147:in `<top (required)>'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rest-client-2.1.0-x64-mingw32/lib/restclient/request.rb:8:in `<top (required)>'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rest-client-2.1.0-x64-mingw32/lib/restclient.rb:10:in `<top (required)>'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rest-client-2.1.0-x64-mingw32/lib/rest-client.rb:2:in `<top (required)>'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:160:in `require'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:160:in `rescue in require'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:149:in `require'
from C:/Users/Lil-Dredd/RubymineProjects/untitled/main.rb:4:in `<main>'
<internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- rest-client (LoadError)
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/Users/Lil-Dredd/RubymineProjects/untitled/main.rb:4:in `<main>'
Process finished with exit code 1
How can I authorize to spotify with rest client in ruby? :(

need basic setup to test a website on real android device (chrome browser) using ruby appium framework

I am trying to setup a basic framework with Cucumber, Appium and Ruby. I am getting errors when I run the basic script. I am testing web app on chrome browser for Android device. I can't figure out what's wrong with the setup. Appium Desktop for windows is running in the background
(Appium v1.12.1)
My env.rb
require "appium_lib"
def caps
{caps:
{
deviceName: "Android_Device",
platformName: "Android",
browserName: "Chrome",
newCommandTimeout: "3600"
}
}
end
Appium::Driver.new(caps, true)
Appium.promote_appium_methods Object
My hooks.rb file
Before do
$driver.start_driver
end
After do
sleep 3
$driver.driver.quit
end
My Step Definition file
Given(/^I log on to the site with the following:$/) do |table|
p "it works"
end
My feature file
Given I log on to the site with the following:
|site|
|ABC|
I am expecting the feature/scenario to pass
Actual Result-
C:\Users\Documents\xyz\abc (master)
λ cucumber features\Simple_POC.feature --tags #run
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
cannot load such file -- 2.5/rubyeventmachine (LoadError)
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/eventmachine-1.2.7-x64-mingw32/lib/rubyeventmachine.rb:2:in `<top (required)>'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `require'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/eventmachine-1.2.7-x64-mingw32/lib/eventmachine.rb:8:in `<top (required)>'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `require'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/faye-websocket-0.10.7/lib/faye/websocket.rb:10:in `<top (required)>'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/appium_lib_core-3.0.4/lib/appium_lib_core/common/ws/websocket.rb:15:in `<top (required)>'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/appium_lib_core-3.0.4/lib/appium_lib_core/common.rb:21:in `require_relative'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/appium_lib_core-3.0.4/lib/appium_lib_core/common.rb:21:in `<top (required)>'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/appium_lib_core-3.0.4/lib/appium_lib_core.rb:18:in `require_relative'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/appium_lib_core-3.0.4/lib/appium_lib_core.rb:18:in `<top (required)>'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/appium_lib-10.2.0/lib/appium_lib/appium.rb:5:in `<top (required)>'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/appium_lib-10.2.0/lib/appium_lib.rb:10:in `require_relative'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/appium_lib-10.2.0/lib/appium_lib.rb:10:in `<top (required)>'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `require'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
C:/Users/Documents/xyz/abc/features/support/env.rb:1:in `<top (required)>'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-3.1.2/lib/cucumber/glue/registry_and_more.rb:107:in `load'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-3.1.2/lib/cucumber/glue/registry_and_more.rb:107:in `load_code_file'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-3.1.2/lib/cucumber/runtime/support_code.rb:144:in `load_file'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-3.1.2/lib/cucumber/runtime/support_code.rb:85:in `block in load_files!'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-3.1.2/lib/cucumber/runtime/support_code.rb:84:in `each'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-3.1.2/lib/cucumber/runtime/support_code.rb:84:in `load_files!'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-3.1.2/lib/cucumber/runtime.rb:272:in `load_step_definitions'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-3.1.2/lib/cucumber/runtime.rb:68:in `run!'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-3.1.2/lib/cucumber/cli/main.rb:34:in `execute!'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-3.1.2/bin/cucumber:9:in `<top (required)>'
C:/Ruby25-x64/bin/cucumber:23:in `load'
C:/Ruby25-x64/bin/cucumber:23:in `<main>'
was able to resolve the issue by doing the following -
1) gem uninstall eventmachine
2) gem install eventmachine --platform ruby
Tried few other solutions but the only one which worked are the above 2 steps.
Might help someone in the future

Unable to create the Project using Taza from cmd prompt

When I try to create the project from cmd prompt using taza gem, I am running into the following error:
cannot load such file -- i18n (LoadError)
I have even updted the gems but still getting the same error.
My system Specifications:
Windows 7
ruby version:1.9.3
Logs:
D:\>taza Example
You don't have i18n installed in your application. Please add it to your Gemfile
and run bundle install
D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require':
cannot load such file -- i18n (LoadError)
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active
_support/i18n.rb:2:in `<top (required)>'
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active
_support/inflector/transliterate.rb:3:in `<top (required)>'
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active
_ support/core_ext/string/inflections.rb:3:in `<top (required)>'
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active
_support/xml_mini.rb:2:in `<top (required)>'
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active
_support/core_ext/array/conversions.rb:1:in `<top (required)>'
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active
_support/duration.rb:2:in `<top (required)>'
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active
_support/core_ext/time/calculations.rb:1:in `<top (required)>'
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active
_support/time.rb:19:in `<top (required)>'
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active
_support/all.rb:2:in `<top (required)>'
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/rubigen-1.5.8/lib/rubigen.rb:4:
in `<top (required)>'
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/taza-0.9.1.2/bin/taza:4:in `<to
p (required)>'
from D:/Ruby193/bin/taza:23:in `load'
from D:/Ruby193/bin/taza:23:in `<main>'
You probably need to install the il8n gem:
gem install i18n
(Run the above from your command prompt to install the gem.)

Cucumber + Minitest Error

I've started to use Cucumber and wrote a simple test before the code implementation and cucumber said that minitest required. How can i require minitest in cucumber and how or in which file minitest should be required? Thanks in advance.
This is my error log:
Warning: you should require 'minitest/autorun' instead.
From C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/2.0.0/test/unit/assertions.rb:1:in `<top (required)>'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/lib/cucumber/rb_support/rb_language.rb:17:in `rescue in rescue in <top (required)>'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/lib/cucumber/rb_support/rb_language.rb:12:in `rescue in <top (required)>'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/lib/cucumber/rb_support/rb_language.rb:9:in `<top (required)>'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/lib/cucumber/cli/options.rb:3:in `<top (required)>'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/lib/cucumber/cli/configuration.rb:2:in `<top (required)>'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/lib/cucumber/cli/main.rb:12:in `<top (required)>'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/bin/cucumber:11:in `<top (required)>'
C:/Ruby200/bin/cucumber:23:in `load'
C:/Ruby200/bin/cucumber:23:in `<top (required)>'
-e:1:in `load'
-e:1:in `<main>'
MiniTest::Unit::TestCase is now Minitest::Test. From C:/Ruby200/lib/ruby/2.0.0/test/unit/testcase.rb:8:in `<module:Unit>'
undefined method `_run_suite' for class `Test::Unit::Runner' (NameError)
C:/Ruby200/lib/ruby/2.0.0/test/unit.rb:670:in `<class:Runner>'
C:/Ruby200/lib/ruby/2.0.0/test/unit.rb:255:in `<module:Unit>'
C:/Ruby200/lib/ruby/2.0.0/test/unit.rb:9:in `<module:Test>'
C:/Ruby200/lib/ruby/2.0.0/test/unit.rb:8:in `<top (required)>'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/lib/cucumber/core_ext/disable_mini_and_test_unit_autorun.rb:2:in `<top (required)>'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/lib/cucumber/runtime.rb:23:in `initialize'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/lib/cucumber/cli/main.rb:44:in `new'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/lib/cucumber/cli/main.rb:44:in `execute!'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.2/bin/cucumber:13:in `<top (required)>'
C:/Ruby200/bin/cucumber:23:in `load'
C:/Ruby200/bin/cucumber:23:in `<top (required)>'
-e:1:in `load'
-e:1:in `<main>'
The particular error you are getting was a bug in cucumber and has been fixed in the latest release of cucumber 1.3.3.
You will probably also need something like this:
require 'minitest'
module MiniTestAssertions
def self.extended(base)
base.extend(MiniTest::Assertions)
base.assertions = 0
end
attr_accessor :assertions
end
World(MiniTestAssertions)
in your features/support/ directory.
Please see cucumber issues: #489 & 456

Resources