Ruby problem with DataMapper "DataObjects :: URI.new with arguments is deprecated ..."

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?

+4
source share
1 answer

Fixed in github in this commit https://github.com/snaggled/dm-do-adapter/commit/d674255fae9ba6e9269290626cf97579d3b7a88d

You can apply it manually in your patch before 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 might 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 
+3
source

All Articles