Getting Error during run apk in Calabash-Android in Windows

69 Views Asked by At

I have setup calabash-android successfully. also resign the apk was successful. Now during run the apk i am getting below error. can anyone please help me to solve this.

C:\Users\test\Automation>bundle exec calabash-android run test_9.apk
undefined method `dir' for nil:NilClass (NoMethodError)
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/run_loop-
2.5.2/lib/run_loop/environment.r
b:12:in `user_home_directory'
C:/Ruby23x64/lib/ruby/gems/2.3.0/gems/run_loop2.5.2/
lib/run_loop/device.rb:564
:in `<class:Device>'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/run_loop-
2.5.2/lib/run_loop/device.rb:2:i
n `<module:RunLoop>'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/run_loop-
2.5.2/lib/run_loop/device.rb:1:i
n `<top (required)>'
1

There are 1 best solutions below

0
kubano On

I haven't used Windows for years, I use Calabash on MacOS. Maybe the %USERPROFILE% environment variable isn't set or points to valid directory. Open the Command Prompt and check it:

echo %USERPROFILE%

In your case, it should return this

C:\Users\test

If it's not, you should set it

set USERPROFILE=C:\Users\test

Although you can list all environment variables with this single command

set

Look for some suspicious or undefinied thing. E.g. the value of %USERNAME% variable should equal to test.