Andrew
Andrew

Reputation: 238707

How to use a version of a gem that has been published on Github but not yet on Rubygems?

I am trying to install, and use, the datamapper gem in my Sinatra application. I am running into an issue where there is a bug in a version of a gem that the datamapper gem depends on: the dm-do-adapter gem.

I'm not exactly sure how to solve this issue. It looks like the bug has been fixed in the master branch of the gem, but hasn't been tagged yet. So my Gemfile currently looks like this:

source 'http://rubygems.org'
gem 'sinatra'
gem 'datamapper'
gem 'dm-do-adapter', :git => 'git://github.com/datamapper/dm-do-adapter.git'

However, it doesn't seem to work. After trying bundle update, I get this message:

Could not find gem 'dm-core (~> 1.1.1)', required by 'dm-do-adapter', in any of the sources

What is the best way to get around this problem?

Upvotes: 3

Views: 112

Answers (1)

Jamison Dance
Jamison Dance

Reputation: 20184

If you are talking about the DataObjects::URI.new with arguments is deprecated warning, then try this:

gem 'dm-do-adapter', 
  git: 'git://github.com/datamapper/dm-do-adapter',
  ref: '7f0b53d1ada8735910e0' 

I just made a new project with the above in my Gemfile and it worked fine.

Upvotes: 2

Related Questions