Error installing calabash-android on Windows

拥有回忆 提交于 2019-12-13 02:15:15

问题


I am trying to install calabash-android on my windows machine but I have serious problem. I follow xamarin guide to install ruby and calabash-android and I was succeed the other day. Then when I try to create my own scenario my computer cause me some problem about scenarios and all my scenarios become fails. I search and read some comments about gherkin mismatch and I wanted to reinstall everything. I uninstall my ruby and and delete all the related files from my pc.(calabash and gem files etc.) Now I want to install calabash-android again but I am having some problem. I tried different versions of ruby but eventually all my effort come to a dead end. My last effort bring me to step 6 on this guide(Manually installing calabash).

PS C:\Users\alper.silistre> gem install ffi –-platform=ruby --no-ri --no-rdoc
The system cannot find the path specified.
Fetching: ffi-1.9.10-x64-mingw32.gem (100%)
Successfully installed ffi-1.9.10-x64-mingw32
ERROR:  While executing gem ... (URI::InvalidURIError)
        bad URI(is not URI?): ?gems=û-platform=ruby

This is the error I gave on step 6. Then I continue because it says Succesfully installed ffi but it gives executing gem error which I have no idea.

Step 7;

PS C:\Users\alper.silistre> gem install xamarin-test-cloud –-platform=ruby --no-ri --no-rdoc
The system cannot find the path specified.
Fetching: retriable-2.0.2.gem (100%)
Successfully installed retriable-2.0.2
Fetching: mime-types-1.25.1.gem (100%)
Successfully installed mime-types-1.25.1
Fetching: netrc-0.10.3.gem (100%)
Successfully installed netrc-0.10.3
Fetching: unf_ext-0.0.7.1-x64-mingw32.gem (100%)
Successfully installed unf_ext-0.0.7.1-x64-mingw32
Fetching: unf-0.1.4.gem (100%)
Successfully installed unf-0.1.4
Fetching: domain_name-0.5.24.gem (100%)
Successfully installed domain_name-0.5.24
Fetching: http-cookie-1.0.2.gem (100%)
Successfully installed http-cookie-1.0.2
Fetching: rest-client-1.8.0-x64-mingw32.gem (100%)
Successfully installed rest-client-1.8.0-x64-mingw32
Fetching: rubyzip-1.1.7.gem (100%)
Successfully installed rubyzip-1.1.7
Fetching: bundler-1.10.5.gem (100%)
Successfully installed bundler-1.10.5
Fetching: thor-0.19.1.gem (100%)
Successfully installed thor-0.19.1
Fetching: xamarin-test-cloud-1.1.1.gem (100%)
Successfully installed xamarin-test-cloud-1.1.1
ERROR:  While executing gem ... (URI::InvalidURIError)
    bad URI(is not URI?): ?gems=û-platform=ruby

Same error at the last 2 line. And I continue again.

Step 8;

PS C:\Users\alper.silistre> gem install calabash-android –-platform=ruby --no-ri --no-rdoc
The system cannot find the path specified.
Fetching: escape-0.0.4.gem (100%)
Successfully installed escape-0.0.4
Fetching: httpclient-2.6.0.1.gem (100%)
Successfully installed httpclient-2.6.0.1
Fetching: awesome_print-1.6.1.gem (100%)
Successfully installed awesome_print-1.6.1
Fetching: multi_test-0.1.2.gem (100%)
Successfully installed multi_test-0.1.2
Fetching: multi_json-1.11.2.gem (100%)
Successfully installed multi_json-1.11.2
Fetching: gherkin-2.12.2.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
The system cannot find the path specified.
ERROR:  Error installing calabash-android:
        ERROR: Failed to build gem native extension.

    C:/Ruby21-x64/bin/ruby.exe -r ./siteconf20150708-1204-dwo4kp.rb extconf.rb
checking for main() in -lc... no
creating Makefile

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/gherkin-2.12.2 f
Results logged to C:/Ruby21-x64/lib/ruby/gems/2.1.0/extensions/x64-mingw32/2.1.0/gherkin-2
ERROR:  While executing gem ... (URI::InvalidURIError)
    bad URI(is not URI?): ?gems=û-platform=ruby

This time it gives me

Error installing calabash-android:
            ERROR: Failed to build gem native extension.

error and also same executing error at the last 2 line.

I tried many things and search a lot on the internet but never found a solution. I am also giving my versions if anyone wonder;

.Microsoft Windows 8.1 Pro
.Ruby version : ruby 2.1.5p273 (2014-11-13 revision 48405) [x64-mingw32]

.List of gems;

*** LOCAL GEMS ***

awesome_print (1.6.1)
bigdecimal (1.2.4)
bundler (1.10.5)
domain_name (0.5.24)
escape (0.0.4)
ffi (1.9.10 x64-mingw32)
http-cookie (1.0.2)
httpclient (2.6.0.1)
io-console (0.4.2)
json (1.8.1)
mime-types (1.25.1)
minitest (4.7.5)
multi_json (1.11.2)
multi_test (0.1.2)
netrc (0.10.3)
psych (2.0.5)
rake (10.1.0)
rdoc (4.1.0)
rest-client (1.8.0 x64-mingw32)
retriable (2.0.2)
rubygems-update (2.4.8)
rubyzip (1.1.7)
test-unit (2.1.5.0)
thor (0.19.1)
unf (0.1.4)
unf_ext (0.0.7.1 x64-mingw32)
xamarin-test-cloud (1.1.1)

I would be very grateful if anyone can help me on this problem and I hope possible answers can solve other peoples problem who may encounter the same situation.


EDIT: I manage to install calabash-android with --verbose at the end with the help of my superior but it seems that the problem is about gherkin gem. It is not allow me to run my test and it gives me error like this


回答1:


This issue:

Error installing calabash-android:
ERROR: Failed to build gem native extension.

Occurs due to incompatibility rubygem version with native extension.

following command will fix this issue:

gem update --system 2.3.0

Refer:

1) https://github.com/rubygems/rubygems/issues/977

2) ERROR: Failed to build gem native extension on Windows



来源:https://stackoverflow.com/questions/31290426/error-installing-calabash-android-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!