diff options
Diffstat (limited to 'railties/lib/ruby_version_check.rb')
-rw-r--r-- | railties/lib/ruby_version_check.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/railties/lib/ruby_version_check.rb b/railties/lib/ruby_version_check.rb new file mode 100644 index 0000000000..68d3acc876 --- /dev/null +++ b/railties/lib/ruby_version_check.rb @@ -0,0 +1,17 @@ +min_release = "1.8.2 (2004-12-25)" +ruby_release = "#{RUBY_VERSION} (#{RUBY_RELEASE_DATE})" +if ruby_release =~ /1\.8\.3/ + abort <<-end_message + + Rails does not work with Ruby version 1.8.3. + Please upgrade to version 1.8.4 or downgrade to 1.8.2. + + end_message +elsif ruby_release < min_release + abort <<-end_message + + Rails requires Ruby version #{min_release} or later. + You're running #{ruby_release}; please upgrade to continue. + + end_message +end |