0

My executing environment:

  1. windows 7 x64, Traditional Chinese Edition
  2. rubyinstaller-1.9.3-p484
  3. DevKit-tdm-32-4.5.2-20110712-1620-sfx
  4. calabash-android 0.5.2

The command I use:

calabash-android run xxx.apk

The error message I get:

No test server found for this combination of app and calabash version. Recreating test server.  
C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.2/lib/calabash-android/helpers.rb:159:in `scan': invalid byte sequence in CP950 (ArgumentError)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.2/lib/calabash-android/helpers.rb:159:in `extract_md5_fingerprint'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.2/lib/calabash-android/helpers.rb:151:in `block (2 levels) in fingerprint_from_apk'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.2/lib/calabash-android/helpers.rb:137:in `chdir'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.2/lib/calabash-android/helpers.rb:137:in `block in fingerprint_from_apk'
from C:/Ruby193/lib/ruby/1.9.1/tmpdir.rb:83:in `mktmpdir'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.2/lib/calabash-android/helpers.rb:136:in `fingerprint_from_apk'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.2/bin/calabash-android-build.rb:2:in `calabash_build'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.2/lib/calabash-android/helpers.rb:92:in `build_test_server_if_needed'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.2/bin/calabash-android-run.rb:16:in `calabash_run'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.2/bin/calabash-android:85:in `<top (required)>'
from C:/Ruby193/bin/calabash-android:24:in `load'
from C:/Ruby193/bin/calabash-android:24:in `<main>'
Charles Wu
  • 904
  • 1
  • 9
  • 19

1 Answers1

0

It's because while running Ruby on windows Chinese edition, the default encoding is UTF-8. we have to force Ruby to run it using UTF-8 encoding. So I modify the command as below:

[Ruby installed path] -EUTF-8 [calabash-andorid installed path] run [apk path]

p.s. My calabash-android installed path:

C:\Ruby193\lib\ruby\gems\1.9.1\gems\calabash-android-0.5.2\bin\calabash-android
Charles Wu
  • 904
  • 1
  • 9
  • 19