@tc.on_object_creation do | to |
puts "New TUIO Object at x: #{to.x_pos}, y: #{to.y_pos}"
end
@tc.on_object_update do | to |
puts "Updated TUIO Object #{to.fiducial_id} at x: #{to.x_pos}, y: #{to.y_pos}"
end
@tc.on_object_removal do | to |
puts "Removed TUIO Object #{to.fiducial_id}"
end
The error:
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require': no such file to load -- core_ext/object (LoadError) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire'
from /home/test/.gem/ruby/1.8/gems/tuio-ruby-0.2.2/lib/tuio-ruby/tuio_client.rb:5
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire'
from /home/test/.gem/ruby/1.8/gems/tuio-ruby-0.2.2/lib/tuio-ruby.rb:10
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:inrequire'
from ruby_test.rb:2
I'm running ubuntu 9.04 with ruby 1.8.7 Got installed tuio-ruby 0.2.2 gem by 'gem install tuio-ruby' and osc-ruby 0.2.0
simple example with slightly modified copy-paste of your example.rb doesn't work. btw, original example.rb doesn't work as well
Looks like requires in 'lib/tuio_client.rb' should be changed to something like these:
core exts
require File.join( File.dirname( FILE ), 'core_ext', 'object' ) require File.join( File.dirname( FILE ), 'core_ext', 'float' )
my code:
require 'rubygems' require 'tuio-ruby' @tc = TuioClient.new
@tc.on_object_creation do | to | puts "New TUIO Object at x: #{to.x_pos}, y: #{to.y_pos}" end
@tc.on_object_update do | to | puts "Updated TUIO Object #{to.fiducial_id} at x: #{to.x_pos}, y: #{to.y_pos}" end
@tc.on_object_removal do | to | puts "Removed TUIO Object #{to.fiducial_id}"
end
The error: /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require': no such file to load -- core_ext/object (LoadError) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
require' from /home/test/.gem/ruby/1.8/gems/tuio-ruby-0.2.2/lib/tuio-ruby/tuio_client.rb:5 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
require' from /home/test/.gem/ruby/1.8/gems/tuio-ruby-0.2.2/lib/tuio-ruby.rb:10 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:ingem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in
require' from ruby_test.rb:2