#1518 new
George Avramidis

Problems using datamapper and qt

Reported by George Avramidis | July 6th, 2011 @ 01:43 PM

When I try to use DataMapper with qt4-bindings, I get some strange errors.

require 'rubygems'
require 'data_mapper'
require 'Qt4'

class Person 
   include DataMapper::Resource
   
   property :id, Serial
   property :name, String
   property :surname, String
end

trying to run this simple script results in an error:

/home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/qtbindings-4.6.3.2/lib/Qt/qtruby4.rb:3191:in `find_pclassid': can't convert nil into String (TypeError)
        from /home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/qtbindings-4.6.3.2/lib/Qt/qtruby4.rb:3191:in `block in qt_methods'
        from /home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/qtbindings-4.6.3.2/lib/Qt/qtruby4.rb:3189:in `loop'
        from /home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/qtbindings-4.6.3.2/lib/Qt/qtruby4.rb:3189:in `qt_methods'
        from /home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/qtbindings-4.6.3.2/lib/Qt/qtruby4.rb:3169:in `instance_methods'
        from /home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/dm-core-1.1.0/lib/dm-core/support/hook.rb:250:in `singletonclass'
        from /home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/dm-core-1.1.0/lib/dm-core/support/hook.rb:246:in `define_hook_stack_execution_methods'
        from /home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/dm-core-1.1.0/lib/dm-core/support/hook.rb:245:in `class_eval'
        from /home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/dm-core-1.1.0/lib/dm-core/support/hook.rb:245:in `define_hook_stack_execution_methods'
        from /home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/dm-core-1.1.0/lib/dm-core/support/hook.rb:186:in `register_hook'
        from /home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/dm-core-1.1.0/lib/dm-core/support/hook.rb:356:in `install_hook'
        from /home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/dm-core-1.1.0/lib/dm-core/support/hook.rb:60:in `before_class_method'
        from /home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/dm-constraints-1.1.0/lib/dm-constraints.rb:32:in `included'
        from /home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/dm-constraints-1.1.0/lib/dm-constraints.rb:31:in `class_eval'
        from /home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/dm-constraints-1.1.0/lib/dm-constraints.rb:31:in `included'
        from /home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/dm-core-1.1.0/lib/dm-core/model.rb:210:in `include'
        from /home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/dm-core-1.1.0/lib/dm-core/model.rb:210:in `block in extended'
        from /home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/dm-core-1.1.0/lib/dm-core/model.rb:210:in `each'
        from /home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/dm-core-1.1.0/lib/dm-core/model.rb:210:in `extended'
        from /home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/dm-core-1.1.0/lib/dm-core/resource.rb:75:in `extend'
        from /home/tdgs/.rvm/gems/ruby-1.9.2-p180/gems/dm-core-1.1.0/lib/dm-core/resource.rb:75:in `included'
        from person.rb:6:in `include'
        from person.rb:6:in `<class:Person>'
        from person.rb:5:in `<main>'

My ruby version is 1.9.2 and I am using the latest gems.

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Attachments

Pages