Bundler: Your Ruby version is 3.1.2, but your Gemfile specified 3.3.0
.ruby-version/the Gemfile ruby line requires a different Ruby than the one running.
Your Ruby version is 3.1.2, but your Gemfile specified 3.3.0Your Ruby version is X, but your Gemfile specified Yruby version mismatch Gemfile .ruby-versionrbenv: version `3.3.0' is not installed (set by /app/.ruby-version) Meaning
Install and activate the right Ruby (rbenv install 3.3.0 && rbenv local 3.3.0, rvm use, asdf), or update the Gemfile and .ruby-version consistently. In Docker use the same base image tag. Run ruby -v and which ruby to confirm what's active.
Common causes
- Wrong Ruby active (system Ruby)
- rbenv/rvm not initialised in the shell
- Gemfile
rubyand.ruby-versiondisagree - CI image uses another Ruby
- Version bumped but not installed
⚡ Quick fix
rbenv install $(cat .ruby-version) && rbenv local $(cat .ruby-version)- Ensure
eval "$(rbenv init -)"is in your shell rc - Align Gemfile/.ruby-version/Docker tag
Detailed fix by platform
Ruby
ruby -v; which ruby; cat .ruby-version; grep '^ruby' Gemfile
How to diagnose
- Active — ruby -v?
- Required — Gemfile/.ruby-version?
- Manager — rbenv/rvm initialised?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- ArgumentError: missing keyword / unknown keyword Ruby: ArgumentError: missing keyword: :name / unknown keyword: :nmae
- ArgumentError: wrong number of arguments (given 1, expected 2) Ruby: ArgumentError: wrong number of arguments (given 1, expected 2..3)
- Bundler could not find compatible versions for gem Bundler: Bundler could not find compatible versions for gem "activesupport": In Gemfile: rails (= 7.1.0) depends on activesupport (= 7.1.0)
Most viewed in Ruby / Rails
- ActiveRecord::PendingMigrationError Rails: ActiveRecord::PendingMigrationError — Migrations are pending. To resolve this issue, run: bin/rails db:migrate
- ActionController::InvalidAuthenticityToken Rails: ActionController::InvalidAuthenticityToken (Can't verify CSRF token authenticity)
- undefined method for nil Ruby: NoMethodError: undefined method `x' for nil (nil:NilClass)
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026