Unable to run calabash-ios + rspec tests with the updated Gem versions

106 views
Skip to first unread message

Sam D.

unread,
Sep 3, 2013, 4:38:55 PM9/3/13
to rs...@googlegroups.com
Hi folks,

I successfully created a few calabash-ios tests using rspec in Rubymine IDE on Mac Mini which worked great; 

however recently I moved to iMac and thus had to configure and install ruby and necessary gems.
However, this time I could not execute my tests due to the following Error and I'm stuck. (copied the error message below)

Best guess is this is related to the difference in version of the gems on both machines. I did version comparison in detail, observed quite a few differences.. listing here the ones I think could be relevant to this error:
(and unfortunately, I am not able to install the older version of the gems now (on iMac) as they do not exists anymore)
Gem                        OldMachine                       NewMachine
CFPropertyList          2.2.0                                         2.2.1
httpclient                  2.3.3                                         2.3.4.1
rspec                       2.14.1, 2.9.0.rc2                         2.14.1
rspec-core               2.14.4, 2.14.3, 2.9.0.rc2               2.14.5
rspec-expectations   2.14.1, 2.14.0, 2.9.0.rc2              2.14.2
rspec-mocks         2.14.3, 2.14.2,  2.14.1,2.9.0.rc2      2.14.3
rubygems-update       2.0.6, 2.0.5                               2.0.7

has anyone else come across any issue with the updated versions of gems? 

Please share any pointers that help me resolve this as earliest as possible. Is there any way to move to the old version of the gems and check if the tests then work correctly??
Or is there anything else that you could think and suggest me to try to make the tests run??

I confirmed My firewall is OFF




The error occurs when attempted to launch the Simulator under 'before' block in _spec.rb file :
@launcher = Calabash::Cucumber::Launcher.new
@launcher.new


---------------------------------------------------------------Error Details  ----------------------------------------------------------------------------------------------------

/Users/admin/.rbenv/versions/2.0.0-p247/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/admin/.rbenv/versions/2.0.0-p247/bin/rspec /Users/admin/Desktop/MyApp-iPhone/sources/spec/FeaturedPage_spec.rb --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter

Testing started at 3:10 PM ...

#<Spec::Runner::Formatter::TeamcityFormatter:0x007fbb58997b70>

#<RSpec::Core::Formatters::DocumentationFormatter:0x007fbb5b220948>

 

Smoke Test

  Exploring Featured Page

 

CFFormatError: invalid XML: #<ArgumentError: wrong number of arguments (0 for 1+)>

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.9.151/lib/calabash-cucumber/operations.rb:67:in `tap'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/baseparser.rb:183:in `pull'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/treeparser.rb:22:in `parse'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rexml/document.rb:283:in `build'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rexml/document.rb:43:in `initialize'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/CFPropertyList-2.2.1/lib/rbREXMLParser.rb:16:in `new'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/CFPropertyList-2.2.1/lib/rbREXMLParser.rb:16:in `block in load'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/CFPropertyList-2.2.1/lib/rbREXMLParser.rb:16:in `open'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/CFPropertyList-2.2.1/lib/rbREXMLParser.rb:16:in `load'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/CFPropertyList-2.2.1/lib/rbCFPropertyList.rb:345:in `load'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/CFPropertyList-2.2.1/lib/rbCFPropertyList.rb:245:in `initialize'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.9.151/lib/calabash-cucumber/launch/simulator_helper.rb:44:in `new'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.9.151/lib/calabash-cucumber/launch/simulator_helper.rb:44:in `block in derived_data_dir_for_project'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.9.151/lib/calabash-cucumber/launch/simulator_helper.rb:42:in `each'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.9.151/lib/calabash-cucumber/launch/simulator_helper.rb:42:in `find'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.9.151/lib/calabash-cucumber/launch/simulator_helper.rb:42:in `derived_data_dir_for_project'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.9.151/lib/calabash-cucumber/launch/simulator_helper.rb:134:in `app_bundle_or_raise'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.9.151/lib/calabash-cucumber/launcher.rb:80:in `relaunch'

/Users/admin/Desktop/MyApp-iPhone/trunk/sources/spec/FeaturedPage_spec.rb:26:in `block (3 levels) in <top (required)>'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example.rb:237:in `instance_eval'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example.rb:237:in `instance_eval'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/hooks.rb:21:in `run'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/hooks.rb:85:in `block in run'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/hooks.rb:85:in `each'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/hooks.rb:85:in `run'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/hooks.rb:446:in `run_hook'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example_group.rb:345:in `run_before_each_hooks'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example.rb:300:in `run_before_each'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example.rb:113:in `block in run'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example.rb:254:in `with_around_each_hooks'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example.rb:111:in `run'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example_group.rb:390:in `block in run_examples'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example_group.rb:386:in `map'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example_group.rb:386:in `run_examples'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example_group.rb:371:in `run'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example_group.rb:372:in `block in run'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example_group.rb:372:in `map'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example_group.rb:372:in `run'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/command_line.rb:28:in `map'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/command_line.rb:28:in `block in run'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/reporter.rb:58:in `report'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/command_line.rb:25:in `run'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/runner.rb:80:in `run'

/Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/runner.rb:17:in `block in autorun'

...

wrong number of arguments (0 for 1+)

Line: -1

Position: -1

Last 80 unconsumed characters:

 

./spec/FeaturedPage_spec.rb:26:in `block (3 levels) in <top (required)>'

    [FP100-015] should display Location selected under Featured Page Header (FAILED - 1)

 

Failures:

 

  1) Smoke Test Exploring Featured Page [FP100-015] should display Location selected under Featured Page Header

     Failure/Error: @launcher.relaunch

     CFFormatError:

       invalid XML: #<ArgumentError: wrong number of arguments (0 for 1+)>

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.9.151/lib/calabash-cucumber/operations.rb:67:in `tap'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/baseparser.rb:183:in `pull'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rexml/parsers/treeparser.rb:22:in `parse'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rexml/document.rb:283:in `build'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rexml/document.rb:43:in `initialize'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/CFPropertyList-2.2.1/lib/rbREXMLParser.rb:16:in `new'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/CFPropertyList-2.2.1/lib/rbREXMLParser.rb:16:in `block in load'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/CFPropertyList-2.2.1/lib/rbREXMLParser.rb:16:in `open'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/CFPropertyList-2.2.1/lib/rbREXMLParser.rb:16:in `load'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/CFPropertyList-2.2.1/lib/rbCFPropertyList.rb:345:in `load'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/CFPropertyList-2.2.1/lib/rbCFPropertyList.rb:245:in `initialize'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.9.151/lib/calabash-cucumber/launch/simulator_helper.rb:44:in `new'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.9.151/lib/calabash-cucumber/launch/simulator_helper.rb:44:in `block in derived_data_dir_for_project'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.9.151/lib/calabash-cucumber/launch/simulator_helper.rb:42:in `each'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.9.151/lib/calabash-cucumber/launch/simulator_helper.rb:42:in `find'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.9.151/lib/calabash-cucumber/launch/simulator_helper.rb:42:in `derived_data_dir_for_project'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.9.151/lib/calabash-cucumber/launch/simulator_helper.rb:134:in `app_bundle_or_raise'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/calabash-cucumber-0.9.151/lib/calabash-cucumber/launcher.rb:80:in `relaunch'

       /Users/admin/Desktop/MyApp-iPhone/trunk/sources/spec/FeaturedPage_spec.rb:26:in `block (3 levels) in <top (required)>'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example.rb:237:in `instance_eval'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example.rb:237:in `instance_eval'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/hooks.rb:21:in `run'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/hooks.rb:85:in `block in run'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/hooks.rb:85:in `each'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/hooks.rb:85:in `run'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/hooks.rb:446:in `run_hook'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example_group.rb:345:in `run_before_each_hooks'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example.rb:300:in `run_before_each'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example.rb:113:in `block in run'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example.rb:254:in `with_around_each_hooks'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example.rb:111:in `run'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example_group.rb:390:in `block in run_examples'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example_group.rb:386:in `map'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example_group.rb:386:in `run_examples'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example_group.rb:371:in `run'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example_group.rb:372:in `block in run'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example_group.rb:372:in `map'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/example_group.rb:372:in `run'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/command_line.rb:28:in `map'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/command_line.rb:28:in `block in run'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/reporter.rb:58:in `report'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/command_line.rb:25:in `run'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/runner.rb:80:in `run'

       /Users/admin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.5/lib/rspec/core/runner.rb:17:in `block in autorun'

       ...

       wrong number of arguments (0 for 1+)

       Line: -1

       Position: -1

       Last 80 unconsumed characters:

     # ./spec/FeaturedPage_spec.rb:26:in `block (3 levels) in <top (required)>'

 

1 example, 1 failure, 0 passed

 

Finished in 0.103899 seconds

 

Finished in 0.1039 seconds

1 example, 1 failure

 

Failed examples:

 

rspec ./spec/FeaturedPage_spec.rb:103 # Smoke Test Exploring Featured Page [FP100-015] should display Location selected under Featured Page Header

 

Process finished with exit code 1

 ---------------------------------------------------------------Error Details  ----------------------------------------------------------------------------------------------------


Appreciate any help on this at the earliest.

I can share gem list contents if you require for analysis.

Thanks 

Sam

 

Myron Marston

unread,
Sep 3, 2013, 4:51:04 PM9/3/13
to rs...@googlegroups.com
Your backtrace indicates the error is coming from the calabash-cucumber gem.  Given the backtrace, I don't believe this is an RSpec issue.  It probably has to do with the fact that you are not using the exact same versions of the gems as before.

One general tip: anytime you change versions of a gem, this kind of thing can happen.  This is the entire reason bundler[1] exists, and I recommend you use it, so that you can repeatedly use the exact same set of known-working gems on any computer, and upgrade your gems in a controlled way.

Myron

Sam D.

unread,
Sep 4, 2013, 11:05:43 AM9/4/13
to rs...@googlegroups.com
Thanks Myron for your inputs.

Actually, the version of calabash-cucumber is 0.9.151 on both the machines and if I run the tests using cucumber (the default language of calabash), the tests do run correctly.
But since I had decided to make use of rspec framework for my automation (instead of cucumber), need to identify the compatible versions for both calabash and rspec.

Now, as you know I've messed up with the versions of gems after installing all the latest ones on the new machine... how, can I use bundler now to make the things work?
(Actually, when I attempt to get the old version for e.g. rspec-core 2.14.4, i get the message that this version do not exists any more)

Is there a way I can get the old versions of the gems now using bundler (like rspec-core, rspec-mocks, etc..) and thus have the same versions of all the gems as I had on the old machine?

I am new to playing around with gems and thus would appreciate if you can elaborate more on getting it implemented

Thanks
Sam

Myron Marston

unread,
Sep 4, 2013, 11:10:40 AM9/4/13
to rs...@googlegroups.com
I'd encourage you to spend some time reading the bundler docs at the bundler website.  You may also want to watch the railscast on the topic [1].

Basically, you need to define a Gemfile and list all the gems you want and the versions you want.

> (Actually, when I attempt to get the old version for e.g. rspec-core 2.14.4, i get the message that this version do not exists any more)

What do you mean?  `gem install rspec-core -v=2.14.4` just worked fine for me.

Myron

Sam D.

unread,
Sep 4, 2013, 11:35:00 AM9/4/13
to rs...@googlegroups.com
Okay, I shall try this too.. and will read the Bundler docs. Thanks for your pointers on this.

have a great day
Sam

Sam D.

unread,
Sep 4, 2013, 3:07:17 PM9/4/13
to rs...@googlegroups.com
Resolving dependencies by creating gemfile and then doing bundle install made the things work.

Thanks Myron for sharing your inputs!


On Wednesday, September 4, 2013 11:10:40 AM UTC-4, Myron Marston wrote:
Reply all
Reply to author
Forward
0 new messages