Gem インストール コマンドの出力:
F:\temp>gem install visualruby
Fetching: cairo-1.15.2-x86-mingw32.gem (100%)
Successfully installed cairo-1.15.2-x86-mingw32
Fetching: glib2-3.0.9-x86-mingw32.gem (100%)
Successfully installed glib2-3.0.9-x86-mingw32
Fetching: gobject-introspection-3.0.9-x86-mingw32.gem (100%)
Successfully installed gobject-introspection-3.0.9-x86-mingw32
Fetching: gio2-3.0.9-x86-mingw32.gem (100%)
Successfully installed gio2-3.0.9-x86-mingw32
Fetching: atk-3.0.9-x86-mingw32.gem (100%)
Successfully installed atk-3.0.9-x86-mingw32
Fetching: pango-3.0.9-x86-mingw32.gem (100%)
Successfully installed pango-3.0.9-x86-mingw32
Fetching: gdk_pixbuf2-3.0.9-x86-mingw32.gem (100%)
Successfully installed gdk_pixbuf2-3.0.9-x86-mingw32
Fetching: cairo-gobject-3.0.9-x86-mingw32.gem (100%)
Successfully installed cairo-gobject-3.0.9-x86-mingw32
Fetching: gdk3-3.0.9-x86-mingw32.gem (100%)
Successfully installed gdk3-3.0.9-x86-mingw32
Fetching: rsvg2-3.0.9-x86-mingw32.gem (100%)
Successfully installed rsvg2-3.0.9-x86-mingw32
Fetching: gtk3-3.0.9-x86-mingw32.gem (100%)
Successfully installed gtk3-3.0.9-x86-mingw32
Fetching: gtksourceview3-3.0.9-x86-mingw32.gem (100%)
Successfully installed gtksourceview3-3.0.9-x86-mingw32
Fetching: require_all-1.3.3.gem (100%)
Successfully installed require_all-1.3.3
Fetching: visualruby-3.0.23.gem (100%)
Successfully installed visualruby-3.0.23
Parsing documentation for cairo-1.15.2-x86-mingw32
Installing ri documentation for cairo-1.15.2-x86-mingw32
Parsing documentation for glib2-3.0.9-x86-mingw32
Installing ri documentation for glib2-3.0.9-x86-mingw32
Parsing documentation for gobject-introspection-3.0.9-x86-mingw32
Installing ri documentation for gobject-introspection-3.0.9-x86-mingw32
Parsing documentation for gio2-3.0.9-x86-mingw32
Installing ri documentation for gio2-3.0.9-x86-mingw32
Parsing documentation for atk-3.0.9-x86-mingw32
Installing ri documentation for atk-3.0.9-x86-mingw32
Parsing documentation for pango-3.0.9-x86-mingw32
Installing ri documentation for pango-3.0.9-x86-mingw32
Parsing documentation for gdk_pixbuf2-3.0.9-x86-mingw32
Installing ri documentation for gdk_pixbuf2-3.0.9-x86-mingw32
Parsing documentation for cairo-gobject-3.0.9-x86-mingw32
Installing ri documentation for cairo-gobject-3.0.9-x86-mingw32
Parsing documentation for gdk3-3.0.9-x86-mingw32
Installing ri documentation for gdk3-3.0.9-x86-mingw32
Parsing documentation for rsvg2-3.0.9-x86-mingw32
Installing ri documentation for rsvg2-3.0.9-x86-mingw32
Parsing documentation for gtk3-3.0.9-x86-mingw32
Installing ri documentation for gtk3-3.0.9-x86-mingw32
Parsing documentation for gtksourceview3-3.0.9-x86-mingw32
Installing ri documentation for gtksourceview3-3.0.9-x86-mingw32
Parsing documentation for require_all-1.3.3
Installing ri documentation for require_all-1.3.3
Parsing documentation for visualruby-3.0.23
Installing ri documentation for visualruby-3.0.23
Done installing documentation for cairo, glib2, gobject-introspection, gio2, atk, pango, gdk_pixbuf2, cairo-gobject, gdk3, rsvg2, gtk3, gtksourceview3, require_all, visualruby after 19 seconds
14 gems installed
visualruby を起動しようとすると、次のようになりました。
F:/projects/static/tools/Ruby23/lib/ruby/gems/2.3.0/gems/gobject-introspection-3.0.9-x86-mingw32/lib/gobject-introspection/loader.rb: line 302
GLib-GObject-WARNING **:attempt to override closure->va_marshal (63C488A0) with new marshal (04D05CD0)
F:/projects/static/tools/Ruby23/lib/ruby/gems/2.3.0/gems/gdk_pixbuf2-3.0.9-x86-mingw32/lib/gdk_pixbuf2/pixbuf.rb:115:in `initialize_with_hash': undefined method `initialize_new_from_file' for #<GdkPixbuf::Pixbuf:091249C8 ptr=00000000> (NoMethodError)
Did you mean? initialize_new_from_inline
initialize_new_from_file_utf8
initialize_new_from_bytes
initialize_new_from_stream
initialize_new_from_data
from...
そこで、ファイルを開き、呼び出しを initialize_new_from_file_utf8 に置き換えました。visualruby を起動すると、GUI が表示されるようになりましたが、コマンド プロンプトにいくつかの警告も表示されます。
F:/projects/static/tools/Ruby23/lib/ruby/gems/2.3.0/gems/gobject-introspection-3.0.9-x86-mingw32/lib/gobject-introspection/loader.rb: line 302
GLib-GObject-WARNING **:attempt to override closure->va_marshal (63C488A0) with new marshal (05CE5CD0)
F:/projects/static/tools/Ruby23/lib/ruby/gems/2.3.0/gems/gobject-introspection-3.0.9-x86-mingw32/lib/gobject-introspection/loader.rb: line 337
Gdk-CRITICAL **:gdk_pixbuf_get_from_surface: assertion 'surface != NULL' failed
F:/projects/static/tools/Ruby23/lib/ruby/gems/2.3.0/gems/gobject-introspection-3.0.9-x86-mingw32/lib/gobject-introspection/loader.rb: line 337
Gdk-CRITICAL **:gdk_pixbuf_get_from_surface: assertion 'surface != NULL' failed
F:/projects/static/tools/Ruby23/lib/ruby/gems/2.3.0/gems/gobject-introspection-3.0.9-x86-mingw32/lib/gobject-introspection/loader.rb: line 337
Gdk-CRITICAL **:gdk_pixbuf_get_from_surface: assertion 'surface != NULL' failed
F:/projects/static/tools/Ruby23/lib/ruby/gems/2.3.0/gems/gobject-introspection-3.0.9-x86-mingw32/lib/gobject-introspection/loader.rb: line 337
Gdk-CRITICAL **:gdk_pixbuf_get_from_surface: assertion 'surface != NULL' failed
F:/projects/static/tools/Ruby23/lib/ruby/gems/2.3.0/gems/gobject-introspection-3.0.9-x86-mingw32/lib/gobject-introspection/loader.rb: line 564
Gtk-WARNING **:Could not load a pixbuf from /org/gtk/libgtk/theme/Adwaita/assets/bullet-symbolic.svg.
This may indicate that pixbuf loaders or the mime database could not be found.
F:/projects/static/tools/Ruby23/lib/ruby/gems/2.3.0/gems/gobject-introspection-3.0.9-x86-mingw32/lib/gobject-introspection/loader.rb: line 564
Gtk-WARNING **:Allocating size to GtkBox 049292D8 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
F:/projects/static/tools/Ruby23/lib/ruby/gems/2.3.0/gems/gobject-introspection-3.0.9-x86-mingw32/lib/gobject-introspection/loader.rb: line 114
Gtk-WARNING **:Allocating size to GtkToolButton 094D1390 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
F:/projects/static/tools/Ruby23/lib/ruby/gems/2.3.0/gems/gobject-introspection-3.0.9-x86-mingw32/lib/gobject-introspection/loader.rb: line 114
Gtk-WARNING **:Allocating size to GtkToolButton 094D15E0 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
F:/projects/static/tools/Ruby23/lib/ruby/gems/2.3.0/gems/gobject-introspection-3.0.9-x86-mingw32/lib/gobject-introspection/loader.rb: line 114
Gtk-WARNING **:Allocating size to GtkToolButton 094D1A80 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
提供されたデモは問題なく動作しますが、これは少し心配です。必要な gem の他のバージョンがインストールされていません。vr のインストールを修正するにはどうすればよいですか?
編集: サンプル プログラム自体は正常に動作しますが、glade は動作しません