My app is working perfectly on my local machine but when I try to deploy/bundle update on heroku I get the following error that prevents from me from deploying.
Bundler could not find compatible versions for gem "mime-types":
In Gemfile:
rails (= 3.2.17) ruby depends on
mime-types (~> 1.16) ruby
stripe (>= 0) ruby depends on
mime-types (2.3)
Running bundle update shows that I am using mime-types 1.25.1. From the error message it seems that ruby stripe would need 2.3, though if that's the case shouldn't it, as a dependency be updated to 2.3?
Thanks in advance for your time.
This related SO question about gem dependency conflicts with Rails depending on old mime-types mentions a syntax for specifying that multiple versions of a dependency are acceptable.
You may be in luck because Stripe just released v1.15.0 which relaxes the mime-type gem requirement in this commit.
The dependency from Stripe is now (greater than or equal to 1.25, or under 3) - whereas in your extract it's requiring version 2.3:
s.add_dependency('mime-types', '>= 1.25', '< 3.0')
And from your excerpt above Rails 3.2.17 needs 1.16 or above, of a 1.x version.
So if you specify you need Stripe v1.15.0 or greater this may fix your issue.
gem 'stripe', ~> 1.15
Related
Trying to upgrade Rails form 5.2.3 to 6.0.0 via bundle update rails, getting the following error:
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (= 6.0.0)
devise-security was resolved to 0.14.2, which depends on
rails (>= 4.2.0, < 7.0)
devise_token_auth was resolved to 1.1.0, which depends on
rails (>= 4.2.0, < 6)
You are using the devise_token_auth gem in your application. The latest version of that is gem is 1.1.0 and that version doesn't support Ruby on Rails 6.0 yet. It still depends on
Rails >= 4.2.0 and < 6 (see the column in the middle of its Rubygems page.
The fact that Rails released a new mayor version usually doesn't mean that all gem support that version on day one. Btw this is the reason why I always suggest to keep the number of used gems as low as possible and not to add a new gem dependency for every simple problem. And often we see that gems never get updated or very late.
In this case it looks like you are lucky because on master on GitHub this issue is already solved. That means the maintainer is aware of this issue and is working on it. You could choose to pull the gem directly from GitHub by changing the entry in your Gemfile to
gem 'devise_token_auth', github: 'lynndylanhurley/devise_token_auth'
But keep in mind that that means you are basically using the latest alpha version all the time and I would not recommend that on production. It might be a good idea to move forward updating your application though.
I'm trying to install a the instagram-ruby-gem but bundler keeps failing with this error:
Bundler could not find compatible versions for gem "faraday":
In Gemfile:
instagram (>= 0) ruby depends on
faraday (< 0.9, >= 0.7.4) ruby
instagram (>= 0) ruby depends on
faraday (0.9.0)
Here's my Gemfile:
gem 'instagram', git: 'https://github.com/larrylv/instagram-ruby-gem.git'
I am using this specific fork because it fixes the faraday version to be compatible with Rails 4. See the commit here, but here's the change:
- s.add_runtime_dependency('faraday', ['>= 0.7', '< 0.9'])
+ s.add_runtime_dependency('faraday', '>= 0.7.4', '<= 0.9.0')
I already tried bundle update. That did not work. The only faraday version installed is faraday 0.9.0.
I downloaded the forked gem, built it and then installed it. It looks like it went through without any issues on my end. So it is something to do with the environment or a gem conflict issue. I'd check to make sure you don't have any other versions of the gem installed. Do you use RVM by any chance and use gemsets with RVM? As a last resort you could delete the Gemfile.lock, but that is not really recommended. You could look at the Gemfile.lock file as well and look at the faraday references. Perhaps other gems need a certain version and the forked gem you use requires another version? I have run in to that before. It is not fun to try and resolve.
Mike Riley
I created a new app in Refinery CMS and followed the instructions according to their guide. http://refinerycms.com/download
But when I go to run rails server, I get errors about gem dependencies. Normally those are easy to fix. But what to do when you have conflicting dependencies? This is one of the errors that I got
Bundler could not find compatible versions for gem "refinerycms-core":
In Gemfile:
refinerycms-blog (~> 2.0.0) ruby depends on
refinerycms-core (~> 2.0.0) ruby
refinerycms (~> 2.1.0) ruby depends on
refinerycms-core (2.1.0)
when I have ran into this problem in the past and I added the specific gem, it then would still give me an error saying that it needed the other gem as well. What am I doing wrong here?
Got a response on Twitter from the people at refinery who sent me this link
https://github.com/refinery/refinerycms/issues/2386#issuecomment-22978992
which says so change the gem to
gem 'refinerycms-blog', github: 'refinery/refinerycms-blog', branch: 'master'
I am trying to update from refinery 1.0.9 to 2.0.9 on ruby 1.9.3. I am getting this error:
Bundler could not find compatible versions for gem "refinerycms-core":
In Gemfile:
refinerycms-news (~> 1.2) ruby depends on
refinerycms-core (~> 1.0.0) ruby
refinerycms (~> 2.0.9) ruby depends on
refinerycms-core (2.0.9)
Can you help me understand the error and what to do about it?
Bundler attempts to make sure that all of the dependencies of all gems (other gems, that is) are installed and meet version requirements specified by the gem designers.
In your Gemfile, you can specify versions of Gems in several ways, the ~> method says the version can be greater than or equal to the number specified, but not so great that a major release can get installed without you knowing.
So it looks like you'll need to relax the restriction on version on the refinery-news gem which likely has a later version available than the 1.2 currently allowed (That version depends on refinerycms-core 1.0.0, but refinerycms needs a later version of the same gem).
Trying to test out this awesome looking gem - http://icelab.com.au/articles/welcome-to-the-omnisocial/ - that promises easy integration of Twitter & FB login to my app.
But, when I run bundle install I see this:
Bundler could not find compatible versions for gem "bcrypt-ruby":
In Gemfile:
omnisocial depends on
bcrypt-ruby (~> 2.1)
bcrypt-ruby (3.0.0)
When I specify that I want Bundler to use version 2.1, I get this:
Bundler could not find compatible versions for gem "bcrypt-ruby":
In Gemfile:
bcrypt-ruby (~> 2.1)
rails (= 3.1.0) depends on
bcrypt-ruby (3.0.0)
So now I have to choose between either Omnisocial or Rails 3.1. Seems like such a crappy choice.
What do I do to get it to work?
I've pushed released a new version of the gem (which I've had to rename to omnipopulus for legal reasons). This new release doesn't depend on any particular version of the bcrypt-ruby gem, so you should be fine to run it with Rails 3.1.
Add this to your Gemfile to get going:
gem 'omnipopulus'
Then run bundle and follow the instructions in the README at https://github.com/icelab/omnipopulus
Make sure that you've removed any references to omnisocial in your app.
The current github version of omnisocial requires no particular version of bcrypt. See here.
But they added a dependency to a RC version of Rails...
What I often do in these cases:
clone the github repository
change what I need
run the gem's test suite
if ok, add my own version to the Rails app
if a new version of the gem is released an fit my needs, I use the official version again