Addressable Gem v2.0 Breaks Datamapper 0.9.6

5 views
Skip to first unread message

Jacques Crocker

unread,
Nov 16, 2008, 1:36:59 AM11/16/08
to DataMapper
Hi. It looks like the newest version of Addressable (v2.0.0) breaks
Datamapper

Here's the exception:
/Library/Ruby/Gems/1.8/gems/dm-core-0.9.6/lib/dm-core/adapters/
data_objects_adapter.rb:137:in `initialize': wrong number of
arguments
(8 for 1) (ArgumentError)


Here's the line
DataObjects::URI.parse(Addressable::URI.new(adapter, user,
password, host, port, database, query, nil))

Looks like Addressable changed their constructor to only take one
argument instead of 8.

Thanks

Dan Kubb (dkubb)

unread,
Nov 16, 2008, 1:49:45 AM11/16/08
to DataMapper
Hi Jaques,

This is now fixed on github:

DataMapper: http://github.com/sam/dm-core/commit/3e1142823bb26f497c1e91d18af12162c43e4e94
DataObjects: http://github.com/sam/do/commit/f48ff5abd6b38cbacb8467ccf9ba06838d1bfdd4

You'll need to update both DO and DM to the latest edge versions in
git to take advantage of the fix. Install DO prior to DM, and run
"rake specs" to verify it works on your side.

Unfortunately I can't push a gem to rubyforge though because I don't
have access, and I don't know the gem push process (hopefully it's
just a rake task, but I'm unsure).

I've contacted Sam Smoot and Adam French via email (both of them can
push a new gem), but if anyone else knows another way to contact them
please let me know here or in IRC (dkubb on freenode.net)

Thanks,

Dan
(dkubb)

Luis Lavena

unread,
Nov 16, 2008, 6:49:03 AM11/16/08
to datam...@googlegroups.com
On Sun, Nov 16, 2008 at 3:49 AM, Dan Kubb (dkubb) <dan....@gmail.com> wrote:
>
> Hi Jaques,
>
> This is now fixed on github:
>
> DataMapper: http://github.com/sam/dm-core/commit/3e1142823bb26f497c1e91d18af12162c43e4e94
> DataObjects: http://github.com/sam/do/commit/f48ff5abd6b38cbacb8467ccf9ba06838d1bfdd4
>

Dan,

I left you a comment on DM commits.

Going the strict way with "=" for addressable will also be a problem
in case Addressable guys do a bugfix release.

--
Luis Lavena
AREA 17
-
Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams

Dan Kubb (dkubb)

unread,
Nov 16, 2008, 1:08:08 PM11/16/08
to DataMapper
Hi Luis,

Thanks for the pointer in the commit comments. I searched for docs on
the gem dependency syntax, but I couldn't find anything clearly
explaining it. I knew if I used the next safest approach -- super
strict settings -- and made it clear in the commit description what I
was doing, that someone would reply with proper usage instructions for
gem :)

I've updated the code to use ~>2.0, which means we support the
Addressable 2.x API.

BTW: I just saw a tweet from @datamapper that said they're working on
a new gem release of DM and DO right now.

Dan
(dkubb)

On Nov 16, 3:49 am, "Luis Lavena" <luislav...@gmail.com> wrote:
> On Sun, Nov 16, 2008 at 3:49 AM, Dan Kubb (dkubb) <dan.k...@gmail.com> wrote:
>
>
>
> > Hi Jaques,
>
> > This is now fixed on github:
>
> > DataMapper:  http://github.com/sam/dm-core/commit/3e1142823bb26f497c1e91d18af12162...

Dan Kubb (dkubb)

unread,
Nov 18, 2008, 12:28:45 PM11/18/08
to DataMapper
FYI, this issue is now resolved with the new DataMapper and
DataObjects 0.9.7 release today.

Dan

Dominic Sisneros

unread,
Nov 18, 2008, 1:05:35 PM11/18/08
to datam...@googlegroups.com

FYI, this issue is now resolved with the new DataMapper and
DataObjects 0.9.7 release today.

--------------------------------------------------------------------------------------------

This breaks on windows when running merb and changing dependency to 0.9.7because of do_sqlite3_adapter

c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:636:in `report_activate_error': RubyGem version error: do_sqlite3(0.9.6 not ~> 0.9.7) (Gem::Lo
adError)
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:141:in `activate'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:49:in `gem'
        from c:/ruby/lib/ruby/gems/1.8/gems/dm-core-0.9.7/lib/dm-core/adapters/sqlite3_adapter.rb:1
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from c:/ruby/lib/ruby/gems/1.8/gems/dm-core-0.9.7/lib/dm-core.rb:146:in `setup'
        from c:/ruby/lib/ruby/gems/1.8/gems/merb_datamapper-1.0/lib/merb/orms/data_mapper/connection.rb:44:in `setup_connections'
        from c:/ruby/lib/ruby/gems/1.8/gems/merb_datamapper-1.0/lib/merb/orms/data_mapper/connection.rb:27:in `connect'
        from c:/ruby/lib/ruby/gems/1.8/gems/merb_datamapper-1.0/lib/merb_datamapper.rb:17:in `run'
        from c:/ruby/lib/ruby/gems/1.8/gems/merb-core-1.0/lib/merb-core/bootloader.rb:99:in `run'
        from c:/ruby/lib/ruby/gems/1.8/gems/merb-core-1.0/lib/merb-core/server.rb:172:in `bootup'
        from c:/ruby/lib/ruby/gems/1.8/gems/merb-core-1.0/lib/merb-core/server.rb:42:in `start'
        from c:/ruby/lib/ruby/gems/1.8/gems/merb-core-1.0/lib/merb-core.rb:169:in `start'
        from c:/ruby/lib/ruby/gems/1.8/gems/merb-core-1.0/bin/merb:11
        from c:/ruby/bin/merb:19:in `load'
        from c:/ruby/bin/merb:19

Will start this in new thread!
Reply all
Reply to author
Forward
0 new messages