wxRubyを使用して最初のGUIを作成しようとしています。(を使用して)wxRubyをインストールしましたが、正常にインストールさgem install wxruby-ruby19
れたようです。wxRubyサイトから直接コードをコピーしました。これが私が使用したコードです:
test.rb
require "wx"
include Wx
class MinimalApp < App
def on_init
Frame.new(nil, -1, "The Bare Minimum").show()
end
end
MinimalApp.new.main_loop
実行すると、次のエラーが発生しました。
<internal:lib/rubygems/custom_require>:29:in `require': libwx_gtk2u_stc-2.8.so.0: cannot open shared object file: No such file or directory - /usr/local/ruby/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86-linux/lib/wxruby2.so (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86-linux/lib/wx.rb:12:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:33:in `require'
from <internal:lib/rubygems/custom_require>:33:in `rescue in require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from test.rb:2:in `<main>'
wxrubyがそのディレクトリにないということだと思っていたのですが、チェックしてみたので、何が問題なのかわかりません。誰かが助けることができれば、それは素晴らしいでしょう。