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?
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
精彩评论