I recently tried to update to Rails 5 and it won't seem to work. I switched it over in my gemfile from 4.2.6 and deleted the gemfile.lock. I then ran gem update rails which seemed to work fine, but then I ran bundle update and I got these errors
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (= 5.0.0)
devise-heroku was resolved to 0.1.0, which depends on
rails (>= 3.1.1)
interactor-rails (~> 1.0) was resolved to 1.0.0, which depends on
rails (< 5, >= 3)
I can't seem to find much documentation on this. Any help would be great. Thanks
So, from the output you got, interactor-rails 1.0 does not support Rails 5. I checked out their page, and it looks like you need to bundle 2.0 version of that gem.
gem "interactor-rails", "~> 2.0"
You can read the docs here
You might need to upgrade the devise-heroku gem as well.
Related
I'm trying to update a rails app from version 5.2 to 6. I'm getting bizarre error messages from bundler.
When I change the rails version in my gemfile to 6 and then run bundle update I get a series of messages like the following:
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
rails (= 6.0) was resolved to 6.0.0, which depends on
activerecord (= 6.0.0)
seed_dump was resolved to 3.3.1, which depends on
activerecord (>= 4)
Since seed_dump depends on any version of activerecord greater than 4, why doesn't bundle consider version 6 compatible?
What can I do to get bundle update to run?
Following the advice in one of the comments, above, I fixed this problem by removing the line BUNDLED_WITH from Gemfile.lock. After removing the line, running bundle update ran without issue.
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 using rails-portfolio my ruby version is 2.3.1 and rails version is 5.1.4
after adding gem 'rails-portfolio' and on running bundle install it gives following error:-
even on running bundle update is shows same error on console without any luck
Bundler could not find compatible versions for gem "rails": In
snapshot (Gemfile.lock):
rails (= 5.1.4)
In Gemfile:
rails (~> 5.1.4)
rails-portfolio (~> 0.0.5) was resolved to 0.0.5, which depends on
rails (~> 4.2)
Running bundle update will rebuild your snapshot from scratch, using
only the gems in your Gemfile, which may resolve the conflict.
You'll need to downgrade your Rails version, or you could fork the Gem, modify portfolio.gemspec to reflect your version and hope it acts as expected — a quick inspection indicates shows that there's nothing glaring obviously that would break.
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.
I've been trying to add the make_flaggable gem to my Rails project and have been getting the following error.
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
make_flaggable (>= 0) ruby depends on
activerecord (< 4.2, >= 3.0) ruby
rails (= 4.2.1) ruby depends on
activerecord (4.2.1)
I've tried bundle update and installing the gems in differing order, but neither of these get around the real issue.
Is the best way to get around this to fork the Gem and make my own copy without the < 4.2 dependency? Or is there another way to install make_flaggable without moving to an older version of Rails?
In the meanwhile, I've found a fork maintained by dgilperez that supports Rails 4.2.
https://github.com/dgilperez/make_flaggable.
Both of these gems, however, I have been unable to install successfully and seem unmaintained.