datamapper/dm-core — Issue #178: Ruby 1.9.3 - Undefined method new! for Date:Class
Author: silverhawk15
Created: 2012-02-08 16:21:07+00:00
State: open

I've been using DataMapper with my rails application and I was interested in seeing if I could upgrade ruby to 1.9.3-p0. I use datamapper's oracle adapter whenever I request some information, it fails.

Here's an example:

````ruby
class MyMappedResource
include DataMapper::Resource

property :id, Serial, field: 'unique_id', :key => true
property :date_updated, Date, field: 'up_date'
#Some methods here...
end

```

If I go into my rails console, and type in:
```
MyMappedResource.first
```
I get the following error:

```
NoMethodError: undefined method `new!' for Date:Class
from /home/silver/.rvm/gems/ruby-1.9.3-p0/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:153:in `next!'
from /home/silver/.rvm/gems/ruby-1.9.3-p0/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:153:in `block in read'
from /home/silver/.rvm/gems/ruby-1.9.3-p0/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:276:in `with_connection'
from /home/silver/.rvm/gems/ruby-1.9.3-p0/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:141:in `read'
from /home/silver/.rvm/gems/ruby-1.9.3-p0/gems/dm-core-1.2.0/lib/dm-core/repository.rb:162:in `read'
from /home/silver/.rvm/gems/ruby-1.9.3-p0/gems/dm-core-1.2.0/lib/dm-core/model.rb:377:in `first'
from (irb):1
from /home/silver/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/commands/console.rb:45:in `start'
from /home/silver/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/commands/console.rb:8:in `start'
from /home/silver/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/commands.rb:40:in `'
from script/rails:6:in `require'
from script/rails:6:in `

'

```

Any ideas as to what might be happening? I am using rvm and did a fresh install of 1.9.3 and then bundled to get the gems installed onto 1.9.3.