1

我刚刚安装了 gtk2 并打算按照教程进行操作,但是LoadError: no such file to load -- glib2.so当我require 'gtk2'.

irb(main):005:0> require 'gtk2'
LoadError: no such file to load -- glib2.so
    from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from C:/ruby/lib/ruby/gems/1.8/gems/glib2-2.0.0-x86-mingw32/lib/glib2.rb:101
    from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from C:/ruby/lib/ruby/gems/1.8/gems/gtk2-2.0.0-x86-mingw32/lib/gtk2/base.rb:12
    from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from C:/ruby/lib/ruby/gems/1.8/gems/gtk2-2.0.0-x86-mingw32/lib/gtk2.rb:11
    from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `gem_original_require'
    from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `require'
    from (irb):5

ruby 1.8.7 (2010-12-23 补丁级别 330) [i386-mingw32]

gtk2 (2.0.0 x86-mingw32)

如何修复此错误?

4

1 回答 1

0

一旦我ruby-gnome2-0.16.0-1-i386-mswin32.exeRuby-GNOME2 安装指南页面下载并安装了它,它现在就可以工作了。

于 2013-05-13T11:34:40.037 回答