==CODE==

#main.rb
require 'sinatra'
require 'data_mapper'

DataMapper.setup(:default, ENV['DATABASE_URL'] || "sqlite3://
#{Dir.pwd}/db/test_dev.db")

class Test

        include DataMapper::Resource
        property :id, Serial
        #property :name, :string
end

DataMapper.auto_migrate!

==CODE==

When I run "rails main.rb" the ruby server starts correctly. If I
uncomment out the second property and try and start the server I get
the following error:

/Users/Brett/.rvm/gems/ruby-1.9.2-p290/gems/dm-core-1.2.0/lib/dm-core/
property.rb:366:in `<': comparison of Symbol with Class failed
(ArgumentError)
        from /Users/Brett/.rvm/gems/ruby-1.9.2-p290/gems/dm-core-1.2.0/lib/dm-
core/property.rb:366:in `determine_class'
        from /Users/Brett/.rvm/gems/ruby-1.9.2-p290/gems/dm-core-1.2.0/lib/dm-
core/model/property.rb:51:in `property'
        from /Users/Brett/.rvm/gems/ruby-1.9.2-p290/gems/dm-validations-1.2.0/
lib/dm-validations/auto_validate.rb:11:in `property'
        from main.rb:11:in `<class:Test>'
        from main.rb:7:in `<main>'

I have the following gems installed


actionmailer (3.2.1)
actionpack (3.2.1)
activemodel (3.2.1)
activerecord (3.2.1)
activeresource (3.2.1)
activesupport (3.2.1)
addressable (2.2.7)
arel (3.0.0)
bcrypt-ruby (3.0.1)
builder (3.0.0)
bundler (1.0.21 ruby)
chunky_png (1.2.5)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.2.0)
compass (0.11.7)
data_mapper (1.2.0)
data_objects (0.10.8)
datamapper (1.2.0)
dm-aggregates (1.2.0)
dm-constraints (1.2.0)
dm-core (1.2.0)
dm-do-adapter (1.2.0)
dm-migrations (1.2.0)
dm-serializer (1.2.1)
dm-sqlite-adapter (1.2.0)
dm-timestamps (1.2.0)
dm-transactions (1.2.0)
dm-types (1.2.1)
dm-validations (1.2.0)
do_sqlite3 (0.10.8)
erubis (2.7.0)
execjs (1.3.0)
fastercsv (1.5.4)
fssm (0.2.8.1)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.2)
jquery-rails (2.0.0)
json (1.6.5)
json_pure (1.6.5)
mail (2.4.1)
mime-types (1.17.2)
multi_json (1.1.0, 1.0.4)
mysql2 (0.3.11)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.1)
rack-protection (1.2.0)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.1)
railties (3.2.1)
rake (0.9.2.2, 0.9.2)
rdoc (3.12)
sass (3.1.15)
sass-rails (3.2.4)
sinatra (1.3.2)
sprockets (2.1.2)
sqlite3 (1.3.5)
stringex (1.3.2)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.31)
uglifier (1.2.3)
uuidtools (2.1.2)

Any help would be great. If anymore information is needed just ask!

Thanks,
Brett

-- 
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.

Reply via email to