Hi to all, sorry 4 my very bad english :(
I've use this code with ruby 1.8.7 (in windows xp) and work :
require 'rubygems'
require 'dm-core'
DataMapper.setup(:default,
:adapter => 'sqlite3',
:database => 'db.sqlite3'
)
class Entity
include DataMapper::Resource
property :id, Serial
property :type, Discriminator
property :name, String
belongs_to :country, :nullable => true
end
class Company < Entity; end
class Person < Entity; end
class Country
include DataMapper::Resource
property :id, Serial
property :name, String
has n, :entities
end
DataMapper.auto_migrate!
us = Country.create(:name => "USA")
hu = Country.create(:name => "Hungary")
c = Company.create(:name => 'Whole Foods', :country => us)
p = Person.create(:name => 'John')
p = Person.create(:name => 'Fredy', :country => hu)
with ruby 1.9.1 (from rubyinstaller.org vers: rubyinstaller-1.9.1-p243-
preview2.exe and rubyinstaller-1.9.1-p129-preview1.exe) and with
devkit-3.4.5r3-20090411.7z don't worK:
Impossible.... msvcrt-ruby18.dll ....
c:/Ruby19p129/lib/ruby/gems/1.9.1/gems/do_sqlite3-0.10.0-x86-mingw32/
lib/do_sqlite3.rb:21:in `require': 126: Impossibile trovare il modulo
specificato. - c:/Ruby19p129/lib/ruby/gems/1.9.1/gems/
do_sqlite3-0.10.0-x86-mingw32/lib/do_sqlite3_ext.so (LoadError)
from c:/Ruby19p129/lib/ruby/gems/1.9.1/gems/do_sqlite3-0.10.0-
x86-mingw32/lib/do_sqlite3.rb:21:in `<top (required)>'
from c:/Ruby19p129/lib/ruby/gems/1.9.1/gems/dm-core-0.10.1/lib/
dm-core/adapters/sqlite3_adapter.rb:3:in `require'
from c:/Ruby19p129/lib/ruby/gems/1.9.1/gems/dm-core-0.10.1/lib/
dm-core/adapters/sqlite3_adapter.rb:3:in `<top (required)>'
from c:/Ruby19p129/lib/ruby/gems/1.9.1/gems/dm-core-0.10.1/lib/
dm-core/adapters.rb:121:in `require'
from c:/Ruby19p129/lib/ruby/gems/1.9.1/gems/dm-core-0.10.1/lib/
dm-core/adapters.rb:121:in `load_adapter'
from c:/Ruby19p129/lib/ruby/gems/1.9.1/gems/dm-core-0.10.1/lib/
dm-core/adapters.rb:101:in `adapter_class'
from c:/Ruby19p129/lib/ruby/gems/1.9.1/gems/dm-core-0.10.1/lib/
dm-core/adapters.rb:13:in `new'
from c:/Ruby19p129/lib/ruby/gems/1.9.1/gems/dm-core-0.10.1/lib/
dm-core.rb:171:in `setup'
from mio.rb:4:in `<main>'
Help me please, i've not found any solution
carlo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---