diff options
Diffstat (limited to 'railties/lib/rails/ruby_version_check.rb')
-rw-r--r-- | railties/lib/rails/ruby_version_check.rb | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/railties/lib/rails/ruby_version_check.rb b/railties/lib/rails/ruby_version_check.rb index 3b37c41c29..e8d1d1e039 100644 --- a/railties/lib/rails/ruby_version_check.rb +++ b/railties/lib/rails/ruby_version_check.rb @@ -1,16 +1,24 @@ -min_release = "1.8.7" -ruby_release = "#{RUBY_VERSION} (#{RUBY_RELEASE_DATE})" -if ruby_release < min_release +if RUBY_VERSION < '1.8.7' + desc = defined?(RUBY_DESCRIPTION) ? RUBY_DESCRIPTION : "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE})" abort <<-end_message - Rails requires Ruby version #{min_release} or later. - You're running #{ruby_release}; please upgrade to continue. + Rails 3 requires Ruby 1.8.7 or 1.9.2. + + You're running + #{desc} + + Please upgrade to continue. end_message -elsif RUBY_VERSION == '1.9.1' - abort <<-EOS - - Rails 3 does not work with Ruby 1.9.1. Please upgrade to 1.9.2. +elsif RUBY_VERSION > '1.9' and RUBY_VERSION < '1.9.2' + $stderr.puts <<-end_message + + Rails 3 doesn't officially support Ruby 1.9.1 since recent stable + releases have segfaulted the test suite. Please upgrade to Ruby 1.9.2 + before Rails 3 is released! - EOS + You're running + #{RUBY_DESCRIPTION} + + end_message end |