diff --git a/.tool-versions b/.tool-versions index 45f1ca6..f18bf99 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1,2 @@ nodejs 24.10.0 +ruby 3.2.2 diff --git a/rails/Gemfile b/rails/Gemfile index 74131a6..92dad45 100644 --- a/rails/Gemfile +++ b/rails/Gemfile @@ -1,5 +1,6 @@ source 'https://rubygems.org' -ruby '>= 3.0' +# ruby 3.2.2 is the latest as of rails 7.0.7.2 specified below +ruby '3.2.2' gem 'rails', '7.0.7.2' diff --git a/rails/bin/determinator b/rails/bin/determinator index 32043b8..e2e05a0 100755 --- a/rails/bin/determinator +++ b/rails/bin/determinator @@ -1,7 +1,7 @@ #!/usr/bin/env ruby gemfile = File.read("./Gemfile") -REQUIRED_RUBY_VERSION = gemfile[/ruby ['"]>=(.+)['"]/, 1] +REQUIRED_RUBY_VERSION = gemfile[/ruby ['"]([\d\.]+)['"]/, 1] ACTUAL_RUBY_VERSION = RUBY_VERSION HOMEBREW_INSTALLATION_COMMAND = '/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"' @@ -52,9 +52,9 @@ end puts "" puts "🤖 I am The Determinator! Come with me if you want to use the right Ruby version!" -puts "ℹ️ Minicom uses Ruby #{REQUIRED_RUBY_VERSION} or greater. Let me check what version of Ruby you have…" +puts "ℹ️ Minicom uses Ruby #{REQUIRED_RUBY_VERSION}. Let me check what version of Ruby you have…" -if REQUIRED_RUBY_VERSION <= ACTUAL_RUBY_VERSION +if REQUIRED_RUBY_VERSION == ACTUAL_RUBY_VERSION puts "✅ You’re using Ruby #{ACTUAL_RUBY_VERSION}. You’re all set!" exit(0) else