E
Emil Macarie
I am somewhat of a Ruby newbie, so if this question is in the wrong
forum please let me know.
The specific problem I have is ActiveRecord + QT, but the problem is
generic and I am asking how to solve similar issues as well.
So I started experimenting with Ruby a bit and I was trying to play
with ActiveRecord.
My first thought was to play with ActiveRecord and understand it
separate from all the Rails infrastructure.
I install ruby 1.9.1, ruby qtbindings, and read up some qt tutorials
and I am ready to rock.
Even the simplest program throws an error when I try to mix qt and
active record.
The following lines do not work.
require 'active_record'
require 'Qt4'
require 'sqlite3'
class Review < ActiveRecord::Base
end
I get the error:
/usr/local/rvm/gems/ruby-1.9.2-p0/gems/qtbindings-4.6.3.2/lib/Qt/qtruby4.rb:3164:in
`constants': wrong number of arguments (1 for 0) (ArgumentError)
from
/usr/local/rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/core_ext/module/introspection.rb:79:in
`local_constants'
Basically there is a constants defined for Module in qtruby4.rb as
well as introspection.rb
How can I go about resolving such a conflict. As far as I can see
there are no modules used, just on giant C like global namespace. Is
there any way I can separate qt and active record by namespace ?
Any suggestions for further research would be very helpful.
Thanks !
forum please let me know.
The specific problem I have is ActiveRecord + QT, but the problem is
generic and I am asking how to solve similar issues as well.
So I started experimenting with Ruby a bit and I was trying to play
with ActiveRecord.
My first thought was to play with ActiveRecord and understand it
separate from all the Rails infrastructure.
I install ruby 1.9.1, ruby qtbindings, and read up some qt tutorials
and I am ready to rock.
Even the simplest program throws an error when I try to mix qt and
active record.
The following lines do not work.
require 'active_record'
require 'Qt4'
require 'sqlite3'
class Review < ActiveRecord::Base
end
I get the error:
/usr/local/rvm/gems/ruby-1.9.2-p0/gems/qtbindings-4.6.3.2/lib/Qt/qtruby4.rb:3164:in
`constants': wrong number of arguments (1 for 0) (ArgumentError)
from
/usr/local/rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/core_ext/module/introspection.rb:79:in
`local_constants'
Basically there is a constants defined for Module in qtruby4.rb as
well as introspection.rb
How can I go about resolving such a conflict. As far as I can see
there are no modules used, just on giant C like global namespace. Is
there any way I can separate qt and active record by namespace ?
Any suggestions for further research would be very helpful.
Thanks !