Deprecate Warnings on dm-do-adapter

56 views
Skip to first unread message

Israel Ben Guilherme Fonseca

unread,
Apr 30, 2011, 2:09:36 PM4/30/11
to datam...@googlegroups.com
Well, maybe it is a noob question but, I made a fresh install of ruby and datamapper, and now i'm getting deprecation warnings whenever I execute a code with datamapper:

I did exactly this after installing ruby 1.9.1:

gem1.9.1 install data_mapper
gem1.9.1 install dbi
gem1.9.1 install dbd-pg
gem1.9.1 install dm-postgres-adapter-1.1.0
gem1.9.1 install pg

(btw, whats the difference of pg and dbd-pg?)

I got this error when executing a code:

/usr/lib/ruby/gems/1.9.1/gems/deprecated-2.0.1/lib/deprecated.rb:199: warning: already initialized constant Deprecate
DataObjects::URI.new with arguments is deprecated, use a Hash of URI components (/usr/lib/ruby/gems/1.9.1/gems/dm-do-adapter-1.1.0/lib/dm-do-adapter/adapter.rb:231:in `new')

This is my gem list:

addressable (2.2.5)
bcrypt-ruby (2.1.4)
data_mapper (1.1.0)
data_objects (0.10.4)
dbd-pg (0.3.9)
dbi (0.4.5)
deprecated (2.0.1)
dm-aggregates (1.1.0)
dm-constraints (1.1.0)
dm-core (1.1.0)
dm-do-adapter (1.1.0) << The warning come from here
dm-migrations (1.1.0)
dm-postgres-adapter (1.1.0)
dm-serializer (1.1.0)
dm-timestamps (1.1.0)
dm-transactions (1.1.0)
dm-types (1.1.0)
dm-validations (1.1.0)
do_postgres (0.10.4)
fastercsv (1.5.4)
json (1.4.6)
pg (0.11.0)
stringex (1.2.1)
uuidtools (2.1.2)

ghedamat

unread,
May 1, 2011, 10:35:48 AM5/1/11
to DataMapper
Same here...

I'm using padrino and bundler

seems that
the fresh padrino install i've made today
uses
data_objects (0.10.4) as a dm-do-adapter dependency

older padrino project uses data_objects (0.10.2) that seems to work...

any hints?

Thank you very much :)



On Apr 30, 8:09 pm, Israel Ben Guilherme Fonseca

Piotr Solnica

unread,
May 1, 2011, 11:55:45 AM5/1/11
to DataMapper
This deprecation warning is silenced in DataMapper 1.1.1 which will be
released within the next few days.

Cheers

# solnic
> > (/usr/lib/ruby/gems/1.9.1/gems/dm-do-adapter-1.1.0/lib/dm-do-adapter/adapte r.rb:231:in

ghedamat

unread,
May 1, 2011, 10:47:05 AM5/1/11
to DataMapper
Updates on this issue
I'm having same issue here
I've started a new padr

looking at an older project it seems that using

data_objects (0.10.3)

till version 0.10.3 does not raise the warning and everything works..

using version 0.10.4 (pulled by bundle update on a new padrino
project)

the warning appears and also the application is not able to work if
I'm using more than one model..

I'm kinda of a datamapper n00b so maybe I'm just doing something
wrong..

I think that i should write my setup in another way ( I suppose ) but
I can't get how this is supposed to work..

DataObjects::URI.new with arguments is deprecated, use a Hash of URI
components (/usr/local/rvm/gems/ruby-1.9.2-p136/gems/dm-do-
adapter-1.1.0/lib/dm-do-adapter/adapter.rb:231:in `new')

If you like I can post a couple of snippets of my code..

thank you for your great help


Mattia

On Apr 30, 8:09 pm, Israel Ben Guilherme Fonseca
<israel....@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages