calabash / calabash-ios

Calabash for iOS
Other
1.81k stars 369 forks source link

Calabash-ios_undefined method `spawn' for RunLoop::Core:Module (NoMethodError) #235

Closed HemaPriya18 closed 11 years ago

HemaPriya18 commented 11 years ago

Hi,

I am new to calabash framework.

I have installed calabash framework and able to execute sample calabash automation test scenarios in simulator. But unfortunately while executing the same test scenarios again gave below error:

undefined method spawn' for RunLoop::Core:Module (NoMethodError) /Library/Ruby/Gems/1.8/gems/run_loop-0.0.22/lib/run_loop/core.rb:142:inrun_with_options' /Library/Ruby/Gems/1.8/gems/run_loop-0.0.22/lib/run_loop/core.rb:362:in run' /Library/Ruby/Gems/1.8/gems/calabash-cucumber-0.9.162/lib/calabash-cucumber/launcher.rb:222:innew_run_loop' /Library/Ruby/Gems/1.8/gems/calabash-cucumber-0.9.162/lib/calabash-cucumber/launcher.rb:220:in times' /Library/Ruby/Gems/1.8/gems/calabash-cucumber-0.9.162/lib/calabash-cucumber/launcher.rb:220:innew_run_loop' /Library/Ruby/Gems/1.8/gems/calabash-cucumber-0.9.162/lib/calabash-cucumber/launcher.rb:159:in relaunch' /Users/user/Documents/Calabash/calabash2/features/support/01_launch.rb:29:inBefore'

Can someone help me to resolve the above issue.

navaneeth commented 11 years ago

You are using an old version of Ruby. Use 1.9.x series.

jmoody commented 11 years ago

that is definitely the problem.

@navaneeth i believe that you introduced this problem in run_loop. is there a fix to support 1.8?

unless i am mistaken, we still want to support ruby 1.8.

navaneeth commented 11 years ago

@jmoody I will look into this.

krukow commented 11 years ago

With Calabash.app and Mavericks, it is soon time to remove Ruby 1.8 support. But not like this! We need to fix this and make a release this week.

oemerbln commented 11 years ago

Right now I've updated to ruby 2.0.0 :+1: rbenv versions system

sudo DEVICE_TARGET=lk2h546gkj256gfjkj5436gfkj526kj6 DEVICE_ENDPOINT=http://192.168.178.53:37265 APP_BUNDLE_PATH=/Users/EngOSS/Library/Developer/Xcode/DerivedData/BLABLA-csspsfdajgtmbybhvgvgnoqfcwyp/Build/Products/Debug-iphoneos/BLABLA.app BUNDLE_ID=bla.blubbs.BLABLA NO_LAUNCH=0 OS=ios7 RESET_BETWEEN_SCENARIOS=1 calabash-ios console

After a start_test_server_in_background the app is started via instrumentation. I can touch buttons and query the GUI-elements of the installed app. So far so fine !

However : If I start the app by calling cucumber I get the following :

sudo DEVICE_TARGET=lk2h546gkj256gfjkj5436gfkj526kj6 DEVICE_ENDPOINT=http://192.168.178.53:37265 APP_BUNDLE_PATH=/Users/EngOSS/Library/Developer/Xcode/DerivedData/BLABLA-csspsfdajgtmbybhvgvgnoqfcwyp/Build/Products/Debug-iphoneos/BLABLA.app BUNDLE_ID=bla.blubbs.BLABLA NO_LAUNCH=0 OS=ios7 RESET_BETWEEN_SCENARIOS=1 cucumber --tags @P716

find: /Users/EngOSS/Library/Application Support/iPhone Simulator/7.0/Applications/: No such file or directory undefined method spawn' for RunLoop::Core:Module (NoMethodError) /Library/Ruby/Gems/1.8/gems/run_loop-0.0.22/lib/run_loop/core.rb:142:inrun_with_options' /Library/Ruby/Gems/1.8/gems/run_loop-0.0.22/lib/run_loop/core.rb:362:in run' /Library/Ruby/Gems/1.8/gems/calabash-cucumber-0.9.162/lib/calabash-cucumber/launcher.rb:222:innew_run_loop' /Library/Ruby/Gems/1.8/gems/calabash-cucumber-0.9.162/lib/calabash-cucumber/launcher.rb:220:in times' /Library/Ruby/Gems/1.8/gems/calabash-cucumber-0.9.162/lib/calabash-cucumber/launcher.rb:220:innew_run_loop' /Library/Ruby/Gems/1.8/gems/calabash-cucumber-0.9.162/lib/calabash-cucumber/launcher.rb:159:in relaunch' /Users/EngOSS/DevRepo/PM_iPad/1_1_56/ProMa_iOS_tablet_v1/features/support/01_launch.rb:29:inBefore'

I need really urgent help here. Does ruby later than 1.9+ know the spawn method or is it another cause which provokes this error ? When do you intend to provide a new release and what exactly you want to fix ?

krukow commented 11 years ago

I think you're ruby environment is not setup correctly. you say you're using 2.0 but your stack trace says 1.8.

/Library/Ruby/Gems/1.8/gems/run_loop-0.0.22/lib/run_loop/core.rb:142:inrun_with_options'

I'm closing as this is not a bug in Calabash.

I recommend trying out Calabash.app for a quick start: https://s3.amazonaws.com/calabashapp/Calabash.zip