camertron / active_nutrition

An ActiveRecord-backed collection of models for storing and retrieving nutritional information from the USDA's Nutrient Database.
33 stars 20 forks source link

Bundler could not find compatible versions for gem #3

Open shannonio opened 7 years ago

shannonio commented 7 years ago

I am getting this error when running bundle in my project.

activerecord (5.0.1) ruby 2.3.1 rails 5.0.1

$ bundle
Fetching gem metadata from https://rubygems.org/........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "activerecord":
  In snapshot (Gemfile.lock):
    activerecord (= 5.0.1)

  In Gemfile:
    active_nutrition was resolved to 0.5.0, which depends on
      activerecord (~> 3.0)

rails (>= 5.0.0.1, ~> 5.0.0) was resolved to 5.0.1, which
depends on
      activerecord (= 5.0.1)

Running `bundle update` will rebuild your snapshot from scratch,
using only
the gems in your Gemfile, which may resolve the conflict.
camertron commented 7 years ago

Hey @shannonio, I think that error is popping up because you're using Rails 5, which active_nutrition doesn't currently support. I did some work last night to modernize it a bit. Could you try adding this to your Gemfile instead?

gem 'active_nutrition', github: 'forrager/active_nutrition', branch: 'modern_rails'

That should let you try my changes to see if they work for you. If everything looks good, I'll publish a new version of the gem.