# Problem installing fxruby

**URL:** <https://www.ruby-forum.com/t/problem-installing-fxruby/260700>\
**Category:** FXRuby\
**Created:** [December 26, 2020, 11:14am UTC](https://www.ruby-forum.com/t/problem-installing-fxruby/260700 "2020-12-26T11:14:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vkantabu1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/3da27b/32.png) [@vkantabu1](https://www.ruby-forum.com/u/vkantabu1)\
**Post date:** [December 26, 2020, 11:14am UTC](https://www.ruby-forum.com/t/problem-installing-fxruby/260700/1 "2020-12-26T11:14:43Z")

</div>

I tried installing fxruby on Catalina using the line “sudo gem install fxruby” and received the following output:

ERROR: Error installing fxruby:  
ERROR: Failed to build gem native extension.

```
current directory: /Library/Ruby/Gems/2.6.0/gems/fxruby-1.6.43/ext/fox16_c

```

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20201226-44588-ryfahm.rb extconf.rb  
checking for fox per pkg-config… \*\*\* extconf.rb failed \*\*\*  
Could not create Makefile due to some reason, probably lack of necessary  
libraries and/or headers. Check the mkmf.log file for more details. You may  
need configuration options.

Provided configuration options:  
–with-opt-dir  
–without-opt-dir  
–with-opt-include  
–without-opt-include=${opt-dir}/include  
–with-opt-lib  
–without-opt-lib=${opt-dir}/lib  
–with-make-prog  
–without-make-prog  
–srcdir=.  
–curdir  
–ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY\_BASE\_NAME)  
–with-fox-dir  
–without-fox-dir  
–with-fox-include  
–without-fox-include=${fox-dir}/include  
–with-fox-lib  
–without-fox-lib=${fox-dir}/lib  
–with-fxscintilla-dir  
–without-fxscintilla-dir  
–with-fxscintilla-include  
–without-fxscintilla-include=${fxscintilla-dir}/include  
–with-fxscintilla-lib  
–without-fxscintilla-lib=${fxscintilla-dir}/lib  
–enable-win32-cross  
–disable-win32-cross  
–with-fox-config  
–without-fox-config  
–with-pkg-config  
–without-pkg-config  
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:in `block in try\_link0’  
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in `mktmpdir' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:in `try\_link0’  
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:570:in `try_link' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:672:in `try\_ldflags’  
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1832:in `pkg_config' from extconf.rb:298:in `block in ’  
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone’  
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone’  
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in `postpone’  
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for' from extconf.rb:297:in `’

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/fxruby-1.6.43/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/fxruby-1.6.43 for inspection.  
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/fxruby-1.6.43/gem\_make.out

**Contents of mkmf.log file:**

“pkg-config --exists fox”  
| pkg-config --libs fox  
=\> “-lFOX-1.6\n”  
"xcrun clang -o conftest -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19 -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/backward -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0 -I. -I/usr/local/include/fxscintilla -I/usr/local/include/fox-1.6 -D\_XOPEN\_SOURCE -D\_DARWIN\_C\_SOURCE -D\_DARWIN\_UNLIMITED\_SELECT -D\_REENTRANT -g -Os -pipe -DHAVE\_GCC\_ATOMIC\_BUILTINS conftest.c -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib -L/usr/local/lib -L. -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.Internal.sdk/usr/local/lib -arch x86\_64 -lruby.2.6 "  
In file included from conftest.c:1:  
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:  
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: fatal error: ‘ruby/config.h’ file not found  
#include “ruby/config.h”  
^ ~~~~~~~~~~~~~~  
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: note: did not find header ‘config.h’ in framework ‘ruby’ (loaded from ‘/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks’)  
1 error generated.  
checked program was:  
/\* begin \*/  
1: #include “ruby.h”  
2:  
3: int main(int argc, char \*_argv)  
4: {  
5: return 0;  
6: }  
/_ end \*/

I’d very much appreciate any help installing fxruby. Thanks.

---

<div class="post-metadata">

**Author:** ![Asimov](https://www.ruby-forum.com/user_avatar/www.ruby-forum.com/asimov/32/778_2.png) [@Asimov](https://www.ruby-forum.com/u/Asimov)\
**Post date:** [December 27, 2020, 1:02am UTC](https://www.ruby-forum.com/t/problem-installing-fxruby/260700/2 "2020-12-27T01:02:53Z")

</div>

You have only the Ruby interpreter. But not the development package

> <https://stackoverflow.com/questions/60481623/errors-when-installing-cocoapods-with-gem>

You might need that after:

> **[GitHub - larskanis/fxruby: FXRuby is an extension module for Ruby that...](https://github.com/larskanis/fxruby)**
>
> FXRuby is an extension module for Ruby that provides an interface to the FOX GUI toolkit. - GitHub - larskanis/fxruby: FXRuby is an extension module for Ruby that provides an interface to the FOX G...

---

<div class="post-metadata">

**Author:** ![vkantabu1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/3da27b/32.png) [@vkantabu1](https://www.ruby-forum.com/u/vkantabu1)\
**Post date:** [December 27, 2020, 6:11am UTC](https://www.ruby-forum.com/t/problem-installing-fxruby/260700/3 "2020-12-27T06:11:29Z")

</div>

So, what should I do? It is also strange that the header file couldn’t be found because the file was in the directory which I had the “-I” option pointing to.

Thanks.

---

<div class="post-metadata">

**Author:** ![vkantabu1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/3da27b/32.png) [@vkantabu1](https://www.ruby-forum.com/u/vkantabu1)\
**Post date:** [December 27, 2020, 11:46pm UTC](https://www.ruby-forum.com/t/problem-installing-fxruby/260700/4 "2020-12-27T23:46:39Z")

</div>

I just solved my problem by completely removing rvm, including removing all hidden file contents that have anything to do with rvm. Then I installed rbenv, and installed the latest ruby (3.0.0-dev) with it. Then ‘gem install fxruby’ worked the first time!
