Raven
Raven

Reputation: 2257

How to fix gem install gtk2 in cygwin Ruby on Windows

I choose to use Cygwin for installing ruby on my system than using the usual rubyinstaller way.

Now, just as when I'm trying to install gems I usually use (like gtk2). It squeaks out some errors.

And here's the details: (I'm on Windows 8)

C:\Users\imraven>ruby -v
ruby 1.9.3p327 (2012-11-10 revision 37606) [i386-cygwin]

C:\Users\imraven>gem install gtk2
Building native extensions.  This could take a while...
ERROR:  Error installing gtk2:
        ERROR: Failed to build gem native extension.

        /usr/bin/ruby.exe extconf.rb
"C:/Program Files (x86)/git/bin/sh.exe": /usr/bin/ruby.exe: No such file or directory


Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/glib2-1.1.9 for inspection.
Results logged to /usr/lib/ruby/gems/1.9.1/gems/glib2-1.1.9/ext/glib2/gem_make.out

What should I do to fix this? The main reason why I'm opting for Cygwin's Ruby is that I wanted to use Process.fork method (which is unavailable from the normal RubyInstaller Windows version of Ruby)

Thanks! :)

Upvotes: 0

Views: 814

Answers (1)

amsiix
amsiix

Reputation: 26

You may have installed ruby for windows, and not the cygwin version.

Run the Cygwin setup, and choose Ruby, under the Ruby category. Also make sure that you've installed the gcc compiler and GNU make, under the Devel category, so that the gems can build the native extensions.

Upvotes: 1

Related Questions