{"id":718,"date":"2018-06-24T12:09:56","date_gmt":"2018-06-24T04:09:56","guid":{"rendered":"https:\/\/woohuiren.me\/blog\/?p=718"},"modified":"2018-06-24T12:09:56","modified_gmt":"2018-06-24T04:09:56","slug":"installing-travisci-ruby-gem-on-fedora-28","status":"publish","type":"post","link":"https:\/\/woohuiren.me\/blog\/installing-travisci-ruby-gem-on-fedora-28\/","title":{"rendered":"Installing TravisCI Ruby Gem on Fedora 28"},"content":{"rendered":"<p>I encountered difficulties trying to install TravisCI&#8217;s &#8216;travis&#8217; Ruby Gem on my Fedora 28 laptop. This was the full error log that I received.<\/p>\n<pre>[woohuiren@localhost ~]$ sudo gem install travis --no-rdoc --no-ri\r\nBuilding native extensions. This could take a while...\r\nERROR: Error installing travis:\r\nERROR: Failed to build gem native extension.\r\n\r\ncurrent directory: \/usr\/local\/share\/gems\/gems\/ffi-1.9.25\/ext\/ffi_c\r\n\/usr\/bin\/ruby -r .\/siteconf20180624-6629-nze4f3.rb extconf.rb\r\n*** extconf.rb failed ***\r\nCould not create Makefile due to some reason, probably lack of necessary\r\nlibraries and\/or headers. Check the mkmf.log file for more details. You may\r\nneed configuration options.\r\n\r\nProvided configuration options:\r\n--with-opt-dir\r\n--without-opt-dir\r\n--with-opt-include\r\n--without-opt-include=${opt-dir}\/include\r\n--with-opt-lib\r\n--without-opt-lib=${opt-dir}\/lib64\r\n--with-make-prog\r\n--without-make-prog\r\n--srcdir=.\r\n--curdir\r\n--ruby=\/usr\/bin\/$(RUBY_BASE_NAME)\r\n--with-ffi_c-dir\r\n--without-ffi_c-dir\r\n--with-ffi_c-include\r\n--without-ffi_c-include=${ffi_c-dir}\/include\r\n--with-ffi_c-lib\r\n--without-ffi_c-lib=${ffi_c-dir}\/lib64\r\n--with-libffi-config\r\n--without-libffi-config\r\n--with-pkg-config\r\n--without-pkg-config\r\n\/usr\/share\/ruby\/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)\r\nYou have to install development tools first.\r\nfrom \/usr\/share\/ruby\/mkmf.rb:541:in `try_link0'\r\nfrom \/usr\/share\/ruby\/mkmf.rb:559:in `try_link'\r\nfrom \/usr\/share\/ruby\/mkmf.rb:660:in `try_ldflags'\r\nfrom \/usr\/share\/ruby\/mkmf.rb:1820:in `pkg_config'\r\nfrom extconf.rb:15:in `&lt;main&gt;'\r\n\r\nTo see why this extension failed to compile, please check the mkmf.log which can be found here:\r\n\r\n\/usr\/local\/lib64\/gems\/ruby\/ffi-1.9.25\/mkmf.log\r\n\r\nextconf failed, exit code 1\r\n\r\nGem files will remain installed in \/usr\/local\/share\/gems\/gems\/ffi-1.9.25 for inspection.\r\nResults logged to \/usr\/local\/lib64\/gems\/ruby\/ffi-1.9.25\/gem_make.out<\/pre>\n<p>After looking at the error log and searching the web about this error, it was because I&#8217;m missing some dependencies that was required. I&#8217;ve came up with a fool-proof divine formula that installs the dependencies required. The command is as follow:<\/p>\n<pre>sudo dnf install redhat-rpm-config ruby ruby-devel make make-devel libffi libffi-devel<\/pre>\n<p>I hope that helps you! If that doesn&#8217;t help resolve the issue for you, feel free to leave a comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I encountered difficulties trying to install TravisCI&#8217;s &#8216;travis&#8217; Ruby Gem on my Fedora 28 laptop. This was the full error log that I received. [woohuiren@localhost ~]$ sudo gem install travis &#8211;no-rdoc &#8211;no-ri Building native extensions. This could take a while&#8230; ERROR: Error installing travis: ERROR: Failed to build gem native extension. current directory: \/usr\/local\/share\/gems\/gems\/ffi-1.9.25\/ext\/ffi_c \/usr\/bin\/ruby &hellip; <a href=\"https:\/\/woohuiren.me\/blog\/installing-travisci-ruby-gem-on-fedora-28\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Installing TravisCI Ruby Gem on Fedora 28&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":719,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[119,2,4],"tags":[105,175,178,177,176],"class_list":["post-718","post","type-post","status-publish","format-image","has-post-thumbnail","hentry","category-fedora","category-information-technology","category-it-softwares","tag-fedora","tag-ruby","tag-ruby-gem","tag-travis","tag-travisci","post_format-post-format-image"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/woohuiren.me\/blog\/wp-content\/uploads\/2018\/06\/travis-ci-gem-error.png?fit=1919%2C950&ssl=1","_links":{"self":[{"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/posts\/718"}],"collection":[{"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/comments?post=718"}],"version-history":[{"count":1,"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/posts\/718\/revisions"}],"predecessor-version":[{"id":720,"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/posts\/718\/revisions\/720"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/media\/719"}],"wp:attachment":[{"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/media?parent=718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/categories?post=718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/tags?post=718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}