4

When I initialize a string in datamapper 1.1.0

DataMapper.setup (:default, "sqlite://#{ Dir.pwd}/base.db")

I get the following error in the Data Mapper:

DataObjects:: URI.new with arguments is deprecated, use a Hash of URI components 

(C: / Ruby192/lib/ruby/gems/1.9.1/gems/dm-do-adapter-1.1.0/lib/dm-do -adapter/adapter.rb: 231: in `new ')

Why is this?

Kev
  • 118,037
  • 53
  • 300
  • 385
harungo
  • 219
  • 2
  • 11

1 Answers1

3

It's fixed in github in this commit https://github.com/snaggled/dm-do-adapter/commit/d674255fae9ba6e9269290626cf97579d3b7a88d

You can aither apply it manually in your the patch to C:/Ruby192/lib/ruby/gems/1.9.1/gems/dm-do-adapter-1.1.0/lib/dm-do-adapter/adapter.rb

- or (not sure if this can work on Windows) -

gem install bundler

git clone git://github.com/snaggled/dm-do-adapter.git
cd dm-do-adapter
Edit Gemfile and replace 'http://' with 'git://'
bundle
rake build
gem install pkg/dm-do-adapter-1.1.1.gem
ybart
  • 876
  • 8
  • 23
  • If you apply the commit manually, note that the linked commit only shows the changes as being on lines 231 and 240, but in reality, the lines in between (232 - 239) are probably different on your local version, so be sure to grab them as well. – charliepark Jul 11 '11 at 15:40