Uploaded April 2025 | Updated November 2026, 2 hours ago
Okay, it has been a while since our last update to the NerdDice.com app back in September of 2023. In the intervening period of time, Rails has released, not one, not two, but three minor version updates. (With Rails, each minor version might as well be a major version. Rails 7.1 is more different than 7.0 than Rails 8.0 is from 7.2.) As a result, our application has fallen into passive disrepair.
Thankfully Rails provides a helpful Upgrade Guide, an upgrade task, and extensive release notes. One of the important things to keep in mind before trying to do an upgrade of Ruby or Rails is that you want to have good tests in place for your application. Thankfully, in our application we have prioritized our test infrastructure, with extensive system tests covering our user sign-up and authentication flows.
There's a lot to do to get things back to current, but we start with getting our version of Ruby upgraded to the latest version (3.4.3 as-of the recording date). Once we upgrade Ruby, we'll upgrade Tailwind from major version 3 to 4, make sure the rest of our bundle is up-to-date, and then start upgrading Rails.
There are a few curveballs involved with trying to upgrade Ruby from 3.2 to 3.4 on Rails 7.0.x. Some items (like bigdecimal) were extracted out of the Ruby standard library into stand-alone gems. Later versions of Rails have compatibility fixes, but for 7.0, we need to make the following adjustments:
- Hold concurrent-ruby at version 1.3.4 (we'll be able to upgrade it after we move to Rails 7.1)
- Temporarily add the bigdecimal, mutex_m, and drb gems to the Gemfile (we'll be able to removed them after we move to Rails 7.1)
- Hold the RuboCop target version at 3.2 until after we upgrade the bundle (the version of RuboCop in the current bundle doesn't support 3.4)
It's also a good idea to move to the latest patch version of Rails 7.0, which we do in the video.
This video covers:
0:00:00 Introduction
0:04:06 Take a look at the GitHub issue, the expected plan for the upgrade, and expected subtasks
0:07:02 Create a new branch to start the Rails 8 upgrade work
0:07:46 Find all the references to Ruby 3.2.2 and replace with 3.4.3. Also look for 3.2 without the patch.
0:09:57 Execute `mise use ruby@3.4.3` to install or switch to Ruby version 3.4.3
0:10:49 Run `bundle update --bundler` to ensure the latest version of bundler and examine changes to Gemfile.lock
0:11:50 Try to run Rails tests. Runtime errors due to dependencies. Troubleshoot.
0:13:00 Update to latest patch version of Rails 7.0, doesn't solve problem. Try to update bootsnap and minitest. No dice.
0:15:50 Review Rails issue related to concurrent-ruby. Downgrade concurrent-ruby to 1.3.4.
0:18:19 Still not working. Temporarily add bigdecimal, mutex_m, and drb
0:21:13 Tests able to run. System tests have some failures related to googleapis, but pass subsequently
0:22:32 RuboCop version doesn't recognize Ruby 3.4. Walk back target Ruby version in .rubocop.yml to 3.2.
0:23:38 Commit changes
0:25:33 Attempt to push, resolve odd remote rejection, it works on retry
0:26:45 Update project and GitHub issue
#ruby #rails7 #rails8 #rails #rubyonrails #rubygems #codecast #screencast #github #opensource #minitest #TDD #agile #NerdDice #DnD #roleplaying #softwaredevelopment #learntocode #tailwind #postgresql #rubocop #devise #turbo #controllers #views #selenium #capybara #systemtest
See other related StatelessCode videos:
- youtu.be/-9bgFkLaWXY
- youtu.be/EeagDumZJxs
- youtu.be/7vWRVgyUHVQ
- youtu.be/Ij1QRQE2hBA
Featured Playlist:
- youtube.com/playlist?list=PL9kkbu1kLUeO5Htd6ZHJVZO1hrAGkFS1z
Resources that we relied upon for this solution:
- Upgrading Ruby on Rails guides.rubyonrails.org/upgrading_ruby_on_rails.html
- Ruby 3.4 Documentation docs.ruby-lang.org/en/3.4
- GitHub Issue: Rails 7.0.8 fails to create an app with most recent concurrent-ruby version github.com/rails/rails/issues/54260
GitHub Commit for this Video:
- github.com/statelesscode/nerd_dice_dot_com/commit/58be9f2
This video is CC0 - No rights reserved. (YouTube doesn't allow this option when publishing.) All code is released under the UNLICENSE. Stateless Code denies the concept of "intellectual property". Copying is not stealing.
Okay, it has been a while since our last update to the NerdDice.com app back in September of 2023. In the intervening period of time, Rails has released, not one, not two, but three minor version updates. (With Rails, each minor version might as well be a major version. Rails 7.1 is more different than 7.0 than Rails 8.0 is from 7.2.) As a result, our application has fallen into passive disrepair.
Thankfully Rails provides a helpful Upgrade Guide, an upgrade task, and extensive release notes. One of the important things to keep in mind before trying to do an upgrade of Ruby or Rails is that you want to have good tests in place for your application. Thankfully, in our application we have prioritized our test infrastructure, with extensive system tests covering our user sign-up and authentication flows.
There's a lot to do to get things back to current, but we start with getting our version of Ruby upgraded to the latest version (3.4.3 as-of the recording date). Once we upgrade Ruby, we'll upgrade Tailwind from major version 3 to 4, make sure the rest of our bundle is up-to-date, and then start upgrading Rails.
There are a few curveballs involved with trying to upgrade Ruby from 3.2 to 3.4 on Rails 7.0.x. Some items (like bigdecimal) were extracted out of the Ruby standard library into stand-alone gems. Later versions of Rails have compatibility fixes, but for 7.0, we need to make the following adjustments:
- Hold concurrent-ruby at version 1.3.4 (we'll be able to upgrade it after we move to Rails 7.1)
- Temporarily add the bigdecimal, mutex_m, and drb gems to the Gemfile (we'll be able to removed them after we move to Rails 7.1)
- Hold the RuboCop target version at 3.2 until after we upgrade the bundle (the version of RuboCop in the current bundle doesn't support 3.4)
It's also a good idea to move to the latest patch version of Rails 7.0, which we do in the video.
This video covers:
0:00:00 Introduction
0:04:06 Take a look at the GitHub issue, the expected plan for the upgrade, and expected subtasks
0:07:02 Create a new branch to start the Rails 8 upgrade work
0:07:46 Find all the references to Ruby 3.2.2 and replace with 3.4.3. Also look for 3.2 without the patch.
0:09:57 Execute `mise use ruby@3.4.3` to install or switch to Ruby version 3.4.3
0:10:49 Run `bundle update --bundler` to ensure the latest version of bundler and examine changes to Gemfile.lock
0:11:50 Try to run Rails tests. Runtime errors due to dependencies. Troubleshoot.
0:13:00 Update to latest patch version of Rails 7.0, doesn't solve problem. Try to update bootsnap and minitest. No dice.
0:15:50 Review Rails issue related to concurrent-ruby. Downgrade concurrent-ruby to 1.3.4.
0:18:19 Still not working. Temporarily add bigdecimal, mutex_m, and drb
0:21:13 Tests able to run. System tests have some failures related to googleapis, but pass subsequently
0:22:32 RuboCop version doesn't recognize Ruby 3.4. Walk back target Ruby version in .rubocop.yml to 3.2.
0:23:38 Commit changes
0:25:33 Attempt to push, resolve odd remote rejection, it works on retry
0:26:45 Update project and GitHub issue
#ruby #rails7 #rails8 #rails #rubyonrails #rubygems #codecast #screencast #github #opensource #minitest #TDD #agile #NerdDice #DnD #roleplaying #softwaredevelopment #learntocode #tailwind #postgresql #rubocop #devise #turbo #controllers #views #selenium #capybara #systemtest
See other related StatelessCode videos:
- youtu.be/-9bgFkLaWXY
- youtu.be/EeagDumZJxs
- youtu.be/7vWRVgyUHVQ
- youtu.be/Ij1QRQE2hBA
Featured Playlist:
- youtube.com/playlist?list=PL9kkbu1kLUeO5Htd6ZHJVZO1hrAGkFS1z
Resources that we relied upon for this solution:
- Upgrading Ruby on Rails guides.rubyonrails.org/upgrading_ruby_on_rails.html
- Ruby 3.4 Documentation docs.ruby-lang.org/en/3.4
- GitHub Issue: Rails 7.0.8 fails to create an app with most recent concurrent-ruby version github.com/rails/rails/issues/54260
GitHub Commit for this Video:
- github.com/statelesscode/nerd_dice_dot_com/commit/58be9f2
This video is CC0 - No rights reserved. (YouTube doesn't allow this option when publishing.) All code is released under the UNLICENSE. Stateless Code denies the concept of "intellectual property". Copying is not stealing.









![Create a RubyGem 98: Replace the Expired Gem Certificate
Okay I messed up, big time. The signing certificate for our gem expired over a year ago. When you add a cert to your gem, youre making a contract with your consumers that you will have a current signed version of your gem available at all times.
With an expired cert, a HighSecurity or even MediumSecurity install will fail. We need to rectify this. The process we use to update the gem certificate
* Move the old cert to an archive directory
* Un-trust the old cert with `gem cert remove [path_to_cert]`
* Generate the new cert from the ~/.ssh directory of the local machine using the command:
`gem cert build [email in gemspec]`
* Change permission for the private key to 0600
* Copy the PUBLIC certificate to the new directory with the command
`cp ~/.ssh/gem-public_cert.pem certs/[RubyGems user name].pem from the gems root directory
* Trust the new cert with `gem cert add certs/[RubyGems user name].pem` from the root directory of the gem
* Test a build version of the gem with `gem build nerd_dice.gemspec`
* Install the built version of the gem with the command
`gem install ./nerd_dice-0.5.0.gem -P HighSecurity` (replace with built version in the future)
* Uninstall the test version of the gem with the command
`gem uninstall nerd_dice -v 0.5.0` (replace as appropriate)
In this video, the need to explicitly remove the expired cert before adding the new one gives us some trouble, but we figure it out and now our users will be able to install with high security again once we release.
This video covers:
00:00:12 Introduction
00:01:14 Demonstrate the problem
00:03:08 Archive the expired certificate and key
00:04:48 Generate the new cert and private key
00:06:41 Copy the new cert to the certs directory of the gem
00:08:38 Build the gem and test that it can be installed with HighSecurity, fails
00:10:49 Troubleshoot install failure. Solution is to remove the old cert before adding the new one
00:15:06 Test install with high security successful; uninstall test version
00:15:49 Commit the new certificate
00:16:34 Update the SECURITY.md file with new end-of-life date for other versions and amend commit to include change
00:18:54 Push to the remote, open pull request, ensure process for updating the certificate is noted in a comment in the issue
00:21:01 Merge pull request and update backlog
#ruby #rubygems #codecast #screencast #NerdDice #DnD #roleplaying #softwaredevelopment #github #opensource #dice #tlm #certificatemanagement #expiredcert
See other related StatelessCode videos:
- Create a RubyGem 06: Release the Gem! https://youtu.be/4ihGTcy9jtI
Resources that we relied upon for this solution:
- Publishing your gem RubyGems.org https://guides.rubygems.org/publishing
- Security guide RubyGems.org https://guides.rubygems.org/security
This video is CC0 - No rights reserved. (YouTube doesnt allow this option when publishing.) All code is released under the UNLICENSE. Stateless Code denies the concept of intellectual property. Copying is not stealing. Create a RubyGem 98: Replace the Expired Gem Certificate](https://i.ytimg.com/vi/TP1cReJgSro/mqdefault.jpg)
