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

bundler error after ruby upgrade to 3.3.0 #401

Closed
s0rin opened this issue Jan 8, 2024 · 3 comments
Closed

bundler error after ruby upgrade to 3.3.0 #401

s0rin opened this issue Jan 8, 2024 · 3 comments

Comments

@s0rin
Copy link

s0rin commented Jan 8, 2024

The following error occurs after upgrade ruby 3.2.2 -> 3.3.0

$ bundle exec rails server
bundler: failed to load command: rails (/home/solinux/.rbenv/versions/3.3.0/bin/rails)
/home/solinux/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/shakapacker-7.2.1/lib/shakapacker/version_checker.rb:72:in `raise_differing_versions_warning': **ERROR** Shakapacker: Shakapacker gem and node package versions do not match (RuntimeError)
Detected: 7.1.0
     gem: 7.2.1
Ensure the installed version of the gem is the same as the version of
your installed node package.
Do not use >= or ~> in your Gemfile for shakapacker without a lockfile.
Do not use ^ or ~ in your package.json for shakapacker without a lockfile.
...

There is no >= or ~> in the Gemfile

...
gem 'shakapacker'
...

Removing the older version of shakapacker won't help

$ gem uninstall shakapacker

Select gem to uninstall:
 1. shakapacker-7.1.0
 2. shakapacker-7.2.1
 3. All versions
> 1
Successfully uninstalled shakapacker-7.1.0
WARN: Unresolved or ambiguous specs during Gem::Specification.reset:
      psych (>= 4.0.0)
      Available/installed versions of this gem:
      - 5.1.2
      - 5.1.1.1
WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'
Please report a bug if this causes problems.

$ gem cleanup shakapacker
Cleaning up installed gems...
WARN: Unresolved or ambiguous specs during Gem::Specification.reset:
      psych (>= 4.0.0)
      Available/installed versions of this gem:
      - 5.1.2
      - 5.1.1.1
WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'
Please report a bug if this causes problems.
Clean up complete

Expected behavior:

To be able to upgrade to ruby 3.3.0

Actual behavior:

Bundler error

Small, reproducible repo:

Setup environment:

  • Ruby version: 3.3.0
  • Rails version: 6.1.7.6
  • Shakapacker version: 7.2.1
@s0rin s0rin added the bug label Jan 8, 2024
@ahangarha
Copy link
Contributor

Your issue seems to be related to not updating the Shakapacker version in your package.json. Ensure you have the exact same version of Shakapacker in Gemfile and package.json.

@ahangarha ahangarha removed the bug label Jan 8, 2024
@ahangarha
Copy link
Contributor

@s0rin I am closing the issue as resolved. Feel free to comment with further details if your issue didn't get resolved by following what I suggested.

@s0rin
Copy link
Author

s0rin commented Jan 8, 2024

Indeed after updating shakapacker version in package.json the error has been solved.
Closing the issue is fine, thank you for your support!

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