Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to build gem native extension when installing Calabash Android on Ubuntu

I want to install Calabash Android on Ubuntu(13.10). I have gem (1.8.23) and ruby (1.9.3p194) installed and tried to run "sudo gem install calabash-android" but keep getting messages saying "Failed to build gem native extension", below is the full messages:

Building native extensions. This could take a while... ERROR: Error installing calabash-android: ERROR: Failed to build gem native extension.

    /usr/bin/ruby1.9.1 extconf.rb

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- mkmf (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire' from extconf.rb:1:in `'

Gem files will remain installed in /var/lib/gems/1.9.1/gems/gherkin-2.12.2 for inspection.

I tried "sudo apt-get update" but it didn't fix the issue. And I also checked gcc so it shouldn't be build issue. Does anyone have any suggestions? Thanks in advance!

like image 368
user2951611 Avatar asked Nov 04 '13 07:11

user2951611


1 Answers

While installing ruby, select development version or full version, so on my system with ubuntu 12.04, i would use

sudo apt-get install ruby1.9.1-full

also please make sure android home path and ant path is proper

Thanks

like image 124
Oxi Avatar answered Nov 15 '22 23:11

Oxi