How to include x86-mingw32 binaries when install a gem

荒凉一梦 提交于 2020-01-06 19:56:11

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!