Hello everyone,
I’ve been struggling for the past two days trying to set up an older version of Ruby on Rails.
I’m currently learning Rails through a course that focuses on versions 5 and 6, but the latest version available now is Rails 8. I want to start from version 5 and gradually move up.
I tried installing Rails 6 using rbenv, but I keep running into dependency conflicts even though the environment should be isolated.
I also tried using Docker (my experience with it is still basic), but even with help from ChatGPT, DeepSeek, and Gemini, I couldn’t get a working environment for Rails 6. Again, I faced the same dependency issues.
If anyone has a working, tested method for installing Rails 5 or 6 especially something simple and clear I’d really appreciate your help.
I’m using MX Linux 23.
Thanks in advance!
How to Install Older Versions of Ruby on Rails (like 5 or 6)? [Solved]
Re: How to Install Older Versions of Ruby on Rails (like 5 or 6)? [Solved]
After many attempts, I finally discovered that the issue was actually within Rails itself. I kept encountering the following error:
To fix it, I manually edited the following file:
At the top of the file, I added this line:
Here’s a quick summary of the installation steps I followed using rbenv:
Install Ruby 2.7.6
Run:
That’s pretty much what I did—and the project is now working!
Thanks, everyone!
Code: Select all
uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)
Code: Select all
~/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb
Code: Select all
require 'logger'
Install Ruby 2.7.6
Run:
Code: Select all
gem install rails -v 6.1.7.10
bundle install
bundle exec rails new . --force
rails server
Thanks, everyone!
Re: How to Install Older Versions of Ruby on Rails (like 5 or 6)?
Welcome in! and glad to hear you have it resolved.
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!
Re: How to Install Older Versions of Ruby on Rails (like 5 or 6)?
@rails123
Good for you, and thanks for documenting your process
That will help folks like me
"Oh, and just one more thing...":


Good for you, and thanks for documenting your process

That will help folks like me

"Oh, and just one more thing...":

Re: How to Install Older Versions of Ruby on Rails (like 5 or 6)?
Thank you both, @CharlesV and @operadude, for the warm welcome and kind words!
I'm really glad to hear that sharing my steps might be helpful to others that’s exactly the kind of spirit I love in a community like this.
Looking forward to learning more and contributing where I can!
Cheers!

I'm really glad to hear that sharing my steps might be helpful to others that’s exactly the kind of spirit I love in a community like this.
Looking forward to learning more and contributing where I can!
Cheers!