Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 7.2 Support #85

Open
travismiller opened this issue Sep 16, 2024 · 1 comment
Open

Rails 7.2 Support #85

travismiller opened this issue Sep 16, 2024 · 1 comment

Comments

@travismiller
Copy link

Context

The Rails frontend can’t currently be installed on Rails 7.2 because of an improper version constraint in upstream canonical-rails.

jumph4x/canonical-rails#92
spree/spree#12136

Expected Behavior

Should be able to add the spree_frontend gem to Rails 7.2.

Actual Behavior

bundle install fails

Possible Fix

Not a fix but using the current open jumph4x/canonical-rails#92 commit permits bundle install to work.

gem "canonical-rails", git: "https://github.com/kolide/canonical-rails.git", ref: "045209a7233efca2d0dbee95142d6319cd7a2f1f"
gem "spree_frontend", "~> 4.7" # Storefront (optional)

Steps to Reproduce

$ git --no-pager diff Gemfile

diff --git a/Gemfile b/Gemfile
index 7fa6ef1..af7d533 100644
--- a/Gemfile
+++ b/Gemfile
@@ -60,7 +60,7 @@ end
 
 gem "spree", "~> 4.7" # core and API
 gem "spree_backend", "~> 4.7" # Admin panel (optional)
-# gem "spree_frontend", "~> 4.7" # Storefront (optional)
+gem "spree_frontend", "~> 4.7" # Storefront (optional)
 gem "spree_emails", "~> 4.7" # transactional emails (optional)
 # gem "spree_sample", "~> 4.7" # dummy data like products, taxons, etc (optional)
 gem "spree_auth_devise", "~> 4.6" # Devise integration (optional)

$ bundle install           

Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Could not find compatible versions

Because canonical-rails >= 0.2.10, < 0.2.13 depends on rails >= 4.1, < 6.2
  and canonical-rails >= 0.2.13, < 0.2.14 depends on rails >= 4.1, <= 7.0,
  canonical-rails >= 0.2.10, < 0.2.14 requires rails >= 4.1, <= 7.0.
And because canonical-rails >= 0.2.14, < 0.2.15 depends on rails >= 4.1, <= 7.1
  and spree_frontend >= 4.2.5 depends on canonical-rails >= 0.2.10, < 1.A,
  spree_frontend >= 4.2.5 requires rails >= 4.1, <= 7.1 or canonical-rails >= 0.2.15, < 1.A.
Because rails >= 7.2.1 depends on actionview = 7.2.1
  and canonical-rails >= 0.2.15 depends on actionview >= 4.1, <= 7.2,
  rails >= 7.2.1 is incompatible with canonical-rails >= 0.2.15.
Thus, rails >= 7.2.1 is incompatible with spree_frontend >= 4.2.5.
So, because Gemfile depends on rails ~> 7.2.1
  and Gemfile depends on spree_frontend ~> 4.7,
  version solving has failed.

Your Environment

  • Version used: Ruby 3.2.2, Rails 7.2, Spree Frontend v4.8.0
  • Gemfile and Gemfile.lock as text in a Gist: (Default Rails 7.2 Gemfile + Add to existing Rails app)
@aliahmad22419
Copy link

Are you still facing this issue? @travismiller
Also Are you using importmaps? or Esbuild for your Rails 7.2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants