Solidus installation issue with rails 6 - ruby-on-rails

I have been trying out to install Solidus on my mac, for which i followed the documentation, https://guides.solidus.io/developers/getting-started/first-time-installation.html
I am using ruby version ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18] and rails version 6.0.0
After adding
gem 'solidus'
gem 'solidus_auth_devise'
While trying bundle install I am facing the following issue
Bundler could not find compatible versions for gem "actionpack":
In snapshot (Gemfile.lock):
actionpack (= 6.0.0)
In Gemfile:
rails (~> 6.0.0) was resolved to 6.0.0, which depends on
actionpack (= 6.0.0)
solidus was resolved to 2.5.0.beta1, which depends on
solidus_core (= 2.5.0.beta1) was resolved to 2.5.0.beta1, which depends on
actionpack (~> 5.1.0)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
Bundler could not find compatible versions for gem "rails":
In snapshot (Gemfile.lock):
rails (= 6.0.0)
In Gemfile:
rails (~> 6.0.0)
solidus was resolved to 1.0.0.pre, which depends on
solidus_core (= 1.0.0.pre) was resolved to 1.0.0.pre, 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.
Am I missing something or messed up with rails version? I can understand that it requries rails version 5.1.0, but is there no support for rails 6 with solidus.

Solidus 2.10.0.beta1 has just been released. This way you can try it out with Rails 6 as well by using:
gem 'solidus', '~> 2.10.0.beta1'
in your Gemfile.

Related

When upgrading from rails 5.1 to 5.2, how do you update your Gemfile?

I'm trying to upgrade my rails application from 5.1.4 to 5.2.
I've gone through the steps here:
https://www.ombulabs.com/blog/rails/upgrades/upgrade-rails-from-5-1-to-5-2.html
However, this completely skips over how to update your gemfile.
When I change
gem 'rails', '~> 5.1.4'
to
gem 'rails', '~> 5.2.2'
I receive the error:
Bundler could not find compatible versions for gem "activesupport":
In snapshot (Gemfile.lock):
activesupport (= 5.1.6.1)
In Gemfile:
rails (~> 5.2.2) was resolved to 5.2.2, which depends on
activesupport (= 5.2.2)
sass-rails (~> 5.0) was resolved to 5.0.7, which depends on
railties (>= 4.0.0, < 6) was resolved to 5.1.6.1, which depends on
activesupport (= 5.1.6.1)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
I can resolve these errors, but this seems to be an incomplete way to update.
What is the proper way to update your gemfile?
bundle update rails
after this you can use gem "bundleup" to see what other gems you can update.

updating rails 4.2.5 to rails 5, keep having ActiveModel dependencies issues

when updating a rails 4.2.5 app (thats in production on heroku) to rails 5, i keep running into the below incompatible version for the gem, i've tried the bundle update, bundle install, done everything asked by the upgrade docs on rails site and stackoverflow.
Bundler could not find compatible versions for gem "activemodel":
In snapshot (Gemfile.lock):
activemodel (= 5.0.0)
In Gemfile:
active_model-errors_details was resolved to 1.3.0, which depends
on
activemodel (< 5.0.0.beta1, >= 3.2.13)
carrierwave was resolved to 1.2.2, which depends on
activemodel (>= 4.0.0)
rails (= 5.0.0) was resolved to 5.0.0, which depends on
activemodel (= 5.0.0)
web-console (~> 2.0) was resolved to 2.3.0, which depends on
activemodel (>= 4.0)
Running `bundle update` will rebuild your snapshot from scratch,
using only
the gems in your Gemfile, which may resolve the conflict.
There is no version of the active_model-errors_details that supports Ruby on Rails 5.x (see its Rubygems page).
But the documentation of the active_model-errors_details says that it is a feature backported from Rails 5.0 to use with Rails 3.2.x and 4.x apps.
Therefore I think there is no need to keep that gem in your application once you update to Ruby 5.0. Just remove the gem 'active_model-errors_details' line from your Gemfile and run bundle install again.

Bundle install command error. Ruby version is 2.2.0 and Rails version is 4.1.8

Error running bundle install command. Ruby version is 2.2.0 and Rails version is 4.1.8. Environment is Apple Mac OS Sierra (10.12.5)
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
composite_primary_keys (= 7.0.15) was resolved to 7.0.15, which depends on
activerecord (~> 4.1.7)
rails (= 4.2.4) was resolved to 4.2.4, which depends on
activerecord (= 4.2.4)
Bundler could not find compatible versions for gem "rack":
In Gemfile:
rack (~> 1.5.3)
omniauth was resolved to 1.7.1, which depends on
rack (< 3, >= 1.6.2)
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (= 4.2.4)
commands was resolved to 0.2.1, which depends on
rails (>= 3.2.0)
model_tree was resolved to 1.0, which depends on
rails
You need to upgrade the version of composite_primary_keys gem.
Change it to ~> 8.0.0 which requires activerecord '~>4.2.0'
gem 'composite_primary_keys', '~> 8.0.0'
Refer composite_primary_keys.gemspec
Similarly, for other gems you can do the same.
Or if you are not sure on the gem versions you can just add gem name and leave the versions for bundler to take care of it.

Upgrading my app to Rails 5. Not sure what to make of errors on bundle install

I changed the rails line in my app's Gemfile from:
gem 'rails', '4.2.3'
To:
gem 'rails', '5.0.0'
Per the rails documentation on the upgrade process. I then ran bundle update rails. I then hit a roadblock:
Bundler could not find compatible versions for gem "railties":
In Gemfile:
dotenv-rails (= 2.0.2) was resolved to 2.0.2, which depends on
railties (~> 4.0)
rails (= 5.0.0) was resolved to 5.0.0, which depends on
railties (= 5.0.0)
As I understand, railties is part of rails? So that seemed weird. To humor the error, I added:
gem 'railties', '5.0.0'
Then bundle update railties yields:
Bundler could not find compatible versions for gem "activerecord":
In snapshot (Gemfile.lock):
activerecord (= 4.2.3)
In Gemfile:
annotate was resolved to 2.7.2, which depends on
activerecord (< 6.0, >= 3.2)
rails (= 5.0.0) was resolved to 5.0.0, which depends on
activerecord (= 5.0.0)
I follow the rabbithole and add:
gem 'activerecord', '5.0.0'
bundle update activerecord yields...
You have requested:
railties = 5.0.0
The bundle currently has railties locked at 4.2.3.
Try running `bundle update railties`
The whole reason I am even updating active record is so that I can update railties... it's running me in circles.
If I run bundle update with my full Gemfile now (activerecord and railties added):
Bundler could not find compatible versions for gem "railties":
In Gemfile:
devise (~> 3.5.6) was resolved to 3.5.6, which depends on
railties (< 5, >= 3.2.6)
rails (= 5.0.0) was resolved to 5.0.0, which depends on
railties (= 5.0.0)
rails (= 5.0.0) was resolved to 5.0.0, which depends on
railties (= 5.0.0)
I'll admit I'm not a total pro at this process. Is there anything I am missing? Has anyone experienced something like this during their upgrade process?
First error means bundle update dotenv-rails, if you are restricting the version make sure it's to one that supports railties 5. Based on your updates, it seems you are in a older devise too. So try to update both at the same time:
bundle update dotenv-rails devise, make sure you read the update notes in dotenv-rails and devise and change anything that needs to be change in your code.
My advise: go to the closest version that supports rails 5 first, so for devise that's 4.0.3 and dotenv-rails 2.1.2. Set this restrictions in your Gemfile before you bundle update. Only after you update this gems successfully attempt to update rails. Add any other gem that comes up to this same process.

not able to create spree rails app

I am trying to create a rails spree app.
I am following this official link.
When I do spree install --auto-accept, I am getting the below error.
Bundler could not find compatible versions for gem "rails":
In snapshot (Gemfile.lock):
rails (= 4.2.0)
In Gemfile:
rails (= 4.2.0)
spree (~> 3.0.8) was resolved to 3.0.8, which depends on
spree_core (= 3.0.8) was resolved to 3.0.8, which depends on
rails (~> 4.2.2)
Running bundle update will rebuild your snapshot from scratch, using
only the gems in your Gemfile, which may resolve the conflict.
And then when I run bundle update, I am getting below error.
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (= 4.2.0)
spree (~> 3.0.8) was resolved to 3.0.8, which depends on
spree_core (= 3.0.8) was resolved to 3.0.8, which depends on
rails (~> 4.2.2)
So I am not able to solve this dependency error.
Please help with a solution.
You are right, I had the same issue. Documentation is a bit outdated.
Please repeat installation process installing version 4.2.2 of Rails instead of 4.2.0:
gem install rails -v 4.2.2
gem install bundler
gem install spree_cmd
rails _4.2.2_ new mystore
cd mystore
spree install --auto-accept
I just checked and it works.

Resources