# Upgrade issues | ruby version mismatch?

**URL:** <https://discuss.rubyonrails.org/t/upgrade-issues-ruby-version-mismatch/82339>\
**Category:** rubyonrails-talk\
**Created:** [February 24, 2023, 1:40pm UTC](https://discuss.rubyonrails.org/t/upgrade-issues-ruby-version-mismatch/82339 "2023-02-24T13:40:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ed\_Jones](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/ed_jones/32/9413_2.png) [@Ed\_Jones](https://discuss.rubyonrails.org/u/Ed_Jones)\
**Post date:** [February 24, 2023, 1:40pm UTC](https://discuss.rubyonrails.org/t/upgrade-issues-ruby-version-mismatch/82339/1 "2023-02-24T13:40:08Z")

</div>

It’s been a couple years… My app stopped running on Heroku. Tried changing to Heroku-22 stack. I’m also moving from Windows dev machine to Mac M1.

What might cause this?

```ruby
rails -v
Your Ruby version is 2.6.10, but your Gemfile specified 2.7.6
ruby -v
ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) [arm64-darwin21]

```

Gemfile:

```ruby
source 'https://rubygems.org'
git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end
ruby '2.7.6'
gem 'rails', '~> 5.2.8'
# gem 'sqlite3'
gem 'pg'
gem 'puma', '~> 3.7'

```

---

<div class="post-metadata">

**Author:** ![walterdavis](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/walterdavis/32/705_2.png) [@walterdavis](https://discuss.rubyonrails.org/u/walterdavis)\
**Post date:** [February 24, 2023, 3:16pm UTC](https://discuss.rubyonrails.org/t/upgrade-issues-ruby-version-mismatch/82339/2 "2023-02-24T15:16:25Z")

</div>

You need to install and configure one (only) of the following: rvm, rbenv, chruby, asdf (and maybe there are others). I’ve been using rvm since it was released, we use rbenv at my day job. They all basically do the same job – get a chosen ruby into your path, and allow you to change between different versions as you move from project to project.

The version that your terminal is reporting to you is the version installed by Apple with the OS and Developer Tools. You should avoid using that for anything at all, except maybe any Mac-specific tools that depend on it.

For the same reason as alluded to above (switching projects) you should also avoid installing another version of Ruby using Homebrew or another tool like it. You want to be able to choose.

Walter

---

<div class="post-metadata">

**Author:** ![Ed\_Jones](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/ed_jones/32/9413_2.png) [@Ed\_Jones](https://discuss.rubyonrails.org/u/Ed_Jones)\
**Post date:** [February 24, 2023, 3:33pm UTC](https://discuss.rubyonrails.org/t/upgrade-issues-ruby-version-mismatch/82339/3 "2023-02-24T15:33:21Z")

</div>

Thanks.

I think it was an outdated bundler or ruby gems. Once I updated those, I could go ahead.
