Browse files

Support ruby 1.8.7 and 1.9.2 (and development versions)

  • Loading branch information...
1 parent f2991fc commit be43ad69afefbe9bbf8e8677f2e35d4a908ca085 @jeremy jeremy committed Jun 11, 2010
Showing with 17 additions and 3 deletions.
  1. +17 −3 railties/lib/rails/ruby_version_check.rb
View
20 railties/lib/rails/ruby_version_check.rb
@@ -1,10 +1,24 @@
-ruby_release = "#{RUBY_VERSION} (#{RUBY_RELEASE_DATE})"
-if ruby_release < '1.8.7' || (ruby_release > '1.8' && ruby_release < '1.9.2')
+if RUBY_VERSION < '1.8.7'
+ desc = defined?(RUBY_DESCRIPTION) ? RUBY_DESCRIPTION : "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE})"
abort <<-end_message
Rails 3 requires Ruby 1.8.7 or 1.9.2.
- You're running #{ruby_release}; please upgrade to continue.
+ You're running
+ #{desc}
+
+ Please upgrade to continue.
+
+ end_message
+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!
+
+ You're running
+ #{RUBY_DESCRIPTION}
end_message
end

0 comments on commit be43ad6

Please sign in to comment.