in irb just try
require ''fox16''
include Fox
and if you get trues then try
application = FXApp.new("Hello", "FoxTest")
main = FXMainWindow.new(application, "Hello", nil, nil, DECOR_ALL)
FXButton.new(main, "&Hello, World!", nil, application,
FXApp::ID_QUIT)
application.create()
main.show(PLACEMENT_SCREEN)
application.run()
On 2/1/11, Ilya Bernshteyn <ilyabe at gmail.com>
wrote:> Hello,
>
> I followed the steps here:
>
>
https://github.com/lylejohnson/fxruby/wiki/Setting-Up-a-Linux-Build-Environment
>
> Created a hello.rb program as described here:
>
> http://www.fxruby.org/doc/tutorial1.html
>
> When I run hello.rb:
>
> ruby hello.rb
>
> I get the following error:
>
> <internal:lib/rubygems/custom_require>:33:in `require'':
> /usr/local/lib/ruby/gems/1.9.1/gems/fxruby-1.6.20-x86-linux/lib/fox16.so:
> undefined symbol: rb_thread_pending -
> /usr/local/lib/ruby/gems/1.9.1/gems/fxruby-1.6.20-x86-linux/lib/fox16.so
> (LoadError)
> from <internal:lib/rubygems/custom_require>:33:in `rescue in
require''
> from <internal:lib/rubygems/custom_require>:29:in `require''
> from
>
/usr/local/lib/ruby/gems/1.9.1/gems/fxruby-1.6.20-x86-linux/lib/fox16.rb:6: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 hello.rb:1:in `<main>''
>
>
> Not quite sure what I''m doing wrong here, but suspect
it''s something with
> the fxruby gem because here''s what I get in irb:
>
> irb(main):001:0> require ''rubygems''
> => true
> irb(main):002:0> require_gem ''fxruby''
>
> NoMethodError: undefined method `require_gem'' for main:Object
> from (irb):3
> from /usr/local/bin/irb:12:in `<main>''
>
> irb(main):003:0> include Fox
> NameError: uninitialized constant Object::Fox
> from (irb):4
> from /usr/local/bin/irb:12:in `<main>''
>
> Thanks for your help!
>
> Ilya
>