问题
On Windows 7, with ruby 2.1.6: I try to install gtk3 with: gem install gtk3
C:\>gem install gtk3
Fetching: pkg-config-1.1.6.gem (100%)
Successfully installed pkg-config-1.1.6
Fetching: cairo-1.14.1-x86-mingw32.gem (100%)
Successfully installed cairo-1.14.1-x86-mingw32
Fetching: glib2-2.2.5-x86-mingw32.gem (100%)
Successfully installed glib2-2.2.5-x86-mingw32
Fetching: gobject-introspection-2.2.5-x86-mingw32.gem (100%)
Successfully installed gobject-introspection-2.2.5-x86-mingw32
Fetching: gio2-2.2.5-x86-mingw32.gem (100%)
Successfully installed gio2-2.2.5-x86-mingw32
Fetching: atk-2.2.5-x86-mingw32.gem (100%)
Successfully installed atk-2.2.5-x86-mingw32
Fetching: pango-2.2.5-x86-mingw32.gem (100%)
Successfully installed pango-2.2.5-x86-mingw32
Fetching: gdk_pixbuf2-2.2.5-x86-mingw32.gem (100%)
Successfully installed gdk_pixbuf2-2.2.5-x86-mingw32
Fetching: cairo-gobject-2.2.5-x86-mingw32.gem (100%)
Successfully installed cairo-gobject-2.2.5-x86-mingw32
Fetching: gdk3-2.2.5-x86-mingw32.gem (100%)
Successfully installed gdk3-2.2.5-x86-mingw32
Fetching: gtk3-2.2.5.gem (100%)
ERROR: Error installing gtk3:
The 'gtk3' native gem requires installed build tools.
So now I notice that for all the gems it is installing, it gets a version with -x86-mingw32 as part of it. Except for gtk3, it says: gtk3-2.2.5.gem, without the -x86-mingw32.
So my question: How can I force installer to download the version with -x86-mingw32 ? or the fact that it doesn't, does that mean that there is no such gem.
If not, how can I find what previous version does include the binaries as part of the gem i.e. -x86-mingw32
Thanks
回答1:
So that is super weird. It looks like there's a bug in the version that ships with Ruby 2.1.6
that is causing it to do weird things. Probably related to the platforms
update in rubygems 2.3.0
.
Anyway, there is a binary version of gtk3
available but you have to update rubygems
Try doing gem update --system
and install gtk3
again.
Note: You can check the available versions of a gem using the rubygems site. Here are the available gtk3 versions.
来源:https://stackoverflow.com/questions/31563570/how-to-include-x86-mingw32-binaries-when-install-a-gem