Error on Updating RefineryCMS - ruby-on-rails

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).

Related

How to fix 'could not find compatible version for gem "rails"'?

Im literaly bumping my head into a wall and I can not find a solution by myself about this problem.
I'm starting a project with Solidus , a Spree commerce fork. I played around with the gem for a litle while and now that I am ready to get serious and start to develop , I create a new project ad I'm bumping into this nasty error :
Bundler could not find compatible versions for gem "rails":
In snapshot (Gemfile.lock):
rails (= 5.1.2)
In Gemfile:
rails (~> 5.1.2)
solidus was resolved to 1.0.0, which depends on
solidus_core (= 1.0.0) was resolved to 1.0.0, which depends on
rails (~> 4.2.0)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
and bundle update is not solving my problem... I am running out of solution and will appreciate some hands in help in how to fix this problem.
Thanks
Bundler is doing you a favor here by showing you that you have incompatible version requirements for the rails gem.
You have rails (~> 5.1.2) listed in your gemfile and the solidus gem has a dependency on rails (~> 4.2.0), so there is a conflict about which version of rails your app should use.
Is there a reason you are using solidus version 1.0.0? It looks like the latest version of solidus is 2.0.2 at present. Later versions of solidus will have a more recent dependency listed for rails, which will allow your application to use rails 5+.
Update the version of solidus in your gemfile to something more recent and see if that allows bundler to install successfully.

Heroku run bundle update fail

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

Gem conflict with refinerycms core and custom engine

First, I apologize ahead of time for any confusion / lack of clarity, this is my first stackoverflow post.
I built a custom engine for my refinery app with the typical:
rails generate refinery:engine web_users first_name:string last_name:string...
Running this puts a gem in the gemfile like so:
gem 'refinerycms-web_users', :path => 'vendor/extensions'
However, I also have 'refinerycms-acts-as-indexed', '~> 1.0.0' in my gemfile for foundation as my front-end framework (specifically for mobile menu navigation).
When running bundle update I get the following error:
refinerycms (~> 2.1.2) ruby depends on
refinerycms-core (= 2.1.2) ruby
refinerycms-web_users (>= 0) ruby depends on
refinerycms-core (2.0.10)
Is there either a solution for downgrading acts-as-index to play nice with refinerycms-core (2.0.10) or to bump up the dependency of a custom engine to refinerycms 2.1.2?
Thanks errrrybody!
Sorry, realize I didn't put the error with acts-as-indexed with refinerycms core 2.1.0:
refinerycms-acts-as-indexed (~> 1.0.0) ruby depends on
refinerycms-core (~> 2.1.0) ruby
You'll need to upgrade your extension to depend on refinerycms-core ~> 2.1.0 which you can do by opening (something like) vendor/extensions/refinerycms-web_users/refinerycms-web_users.gemspec and specifying the updated dependency version in place of what is already specified. You'll then want to ensure that it works properly with the updated version of refinerycms-core.

Bundler could not find compatible versions for gem "mime-types"

I was going through my Gemfile updating to the latest releases when I got this error:
Bundler could not find compatible versions for gem "mime-types":
In Gemfile:
rails (= 4.0.2) ruby depends on
mime-types (~> 1.16) ruby
mechanize (= 2.7.3) ruby depends on
mime-types (2.0)
Is it true that Rails 4.0.2 is depending on a much older version of mime-types than a lot of gems that are out there or is there something wrong with my local configuration?
P.S. I tried updating the dependencies with ´bundle update´, but I just got the same error again.
rails requires mime-types with a version of 1.16 or greater, but smaller than 2.0. However, mechanize requires mime-types with a version of 2.0 or greater.
I suggest you drop the mechanize-version to 2.7.2:
gem 'mechanize', '2.7.2'
This will resolve your conflict.

Spree install error "spree (>=0) x86-mingw32 depends on thor (=0.15.4)"

Installing spree on rails gives multiple errors for dependence on 'thor' although I have both versions in my gem list.
#
Bundler could not find compatible versions for gem "thor":
In Gemfile:
spree (>=0) x86-mingw32 depends on
thor (= 0.14.6) x86-mingw32
sass-rails (~> 3.23) x86-mingw32 depends on
thor (= 0.15.4)
#
NOTE: My versions used are:
rails 3.2.6
spree 1.1.2
ruby 1.9.3p194
Although you're asking about a specific install error, I'm assuming that since it sounds like you're setting up a development environment that the following could be helpful:
Setting Spree up on Windows can be a little bit of a pain, and using Vagrant and VirtualBox is a good way around the issues. This Vagrant setup and bootstrap script installs more recent versions of Rails, Ruby and Spree, but you should be able to modify it to your taste (focus on bootstrap.sh):
https://github.com/nurelm/spree_vagrant

Resources